bugProgramming from the Ground Up Book - Bugs: bug #11159, on pg. 81, O_CREAT_WRONLY_TRUNC...

 
 

bug #11159: on pg. 81, O_CREAT_WRONLY_TRUNC should be 01101

Submitter:  None
Submitted:  Mon 29 Nov 2004 04:34:42 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Mon 29 Nov 2004 04:34:42 AM UTC, original submission:  

On page 81 of the paper version of Programming from the Ground Up v1.1, according to Appendix G, Document History, the open flags for the output file are defined by a .equ as:

.equ O_CREAT_WRONLY_TRUNC, 03101

According to /usr/include/asm/fcntl.h on my system (2.4.20), this should be 01101.  No harm is done, as Linux seems to honor the trunc bit, so the example behaves as expected.  I checked the flags with the attached tiny C program, and the results seem to confirm my reading of fcntl.h

Anonymous

 

Attached Files

Attached Files
file #2115:  flags.c added by None (137B - text/x-c - Short C program to display flags)

(Note: upload size limit is set to 4.0MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

History

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2004-11-29 None Attached File- Added flags.c, #1926

Back to the top

Powered by Savane 3.16-2753.
Corresponding source code