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

Submitted by:  None
Submitted on:  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

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


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:


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



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

Attach Files:

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


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

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.6