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
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

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

 

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

Attach Files:
   
   
Comment:
   

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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.

 

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.14-8eb0.
Corresponding source code