[Bug 1870] New: lseek changes the file size while write or truncate are not called on IMFS and DOSFS

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Mon Aug 1 12:59:29 UTC 2011


https://www.rtems.org/bugzilla/show_bug.cgi?id=1870

           Summary: lseek changes the file size while write or truncate
                    are not called on IMFS and DOSFS
           Product: RTEMS
           Version: HEAD
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: filesystem
        AssignedTo: chrisj at rtems.org
        ReportedBy: medivhc at gmail.com


The spec says:
Although lseek() may position the file offset beyond the end of the file, this
function does not itself extend the size of the file. While the only function
in IEEE Std 1003.1-2001 that may directly extend the size of the file is
write(), truncate(), and ftruncate(), several functions originally derived from
the ISO C standard, such as fwrite(), fprintf(), and so on, may do so (by
causing calls on write()).

So the file size should not change when calling lseek to set beyond the end of
the existing data in the file.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list