Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 706928

Summary: fsync section asks the programmer to truncate file before reading from it
Product: Red Hat Enterprise Linux 6 Reporter: Jan Kundrát <jkt>
Component: doc-Power_Management_GuideAssignee: Jack Reed <jreed>
Status: CLOSED CURRENTRELEASE QA Contact: ecs-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0CC: dayleparker, ineilsen, jskarvad, pbokoc
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 767869 (view as bug list) Environment:
Last Closed: 2012-06-22 00:15:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 767869    

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.