Bug 706928 - fsync section asks the programmer to truncate file before reading from it
Summary: fsync section asks the programmer to truncate file before reading from it
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: doc-Power_Management_Guide
Version: 6.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jack Reed
QA Contact: ecs-bugs
URL:
Whiteboard:
Depends On:
Blocks: 767869
TreeView+ depends on / blocked
 
Reported: 2011-05-23 13:57 UTC by Jan Kundrát
Modified: 2013-06-17 05:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 767869 (view as bug list)
Environment:
Last Closed: 2012-06-22 00:15:00 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jan Kundrát 2011-05-23 13:57:39 UTC
I suspect that the documentation at [1] has an error in the second code snippet, the following line:

open("/.kde/myconfig", O_WRONLY|O_TRUNC|O_CREAT);

Instead of reading the configuration from source and only then writing the second one, the original file is truncated before reading from it.

I suspect it should be changed to *read* from that file.

[1] http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Power_Management_Guide/Developer_Tips-Fsync.html

Comment 3 Jack Reed 2011-12-12 01:24:50 UTC
Thanks for pointing this out, Jan. I've changed 'open' to 'read' in the second sample config file ready for the 6.3 version of the guide.

Comment 10 IanNeilsen 2011-12-19 00:44:03 UTC
QE verified in version

Red_Hat_Enterprise_Linux-Power_Management_Guide-6-en-US-1.0-13

[verified]

Comment 11 Dayle Parker 2012-06-22 00:15:00 UTC
This bug is now fixed and available as part of the Red Hat Enterprise Linux 6.3 release on http://docs.redhat.com/.

Setting to CLOSED > CURRENTRELEASE.


Note You need to log in before you can comment on or make changes to this bug.