| 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_Guide | Assignee: | Jack Reed <jreed> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | ecs-bugs | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 6.0 | CC: | dayleparker, ineilsen, jskarvad, pbokoc | |
| Target Milestone: | rc | Keywords: | 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: | ||
| Bug Depends On: | ||||
| Bug Blocks: | 767869 | |||
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. QE verified in version Red_Hat_Enterprise_Linux-Power_Management_Guide-6-en-US-1.0-13 [verified] 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. |
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