Bug 49700 - Incorrect handling of return value of posix_fallocate()
Summary: Incorrect handling of return value of posix_fallocate()
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Lennart Poettering
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-09 12:06 UTC by Guillermo Vidal
Modified: 2012-05-21 16:45 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Proposed solution (1.64 KB, application/octet-stream)
2012-05-09 12:06 UTC, Guillermo Vidal
Details

Description Guillermo Vidal 2012-05-09 12:06:22 UTC
Created attachment 61299 [details]
Proposed solution

According to the man pages of posix_fallocate, it returns zero on
success or an error number on failure; however,  errno is not set
on failure. If the kernel or a library other than glibc does not
support the function for example, EOPNOTSUPP will be returned and
the error will not be handled properly with original code.

Please see proposed solution attached.
Comment 1 Lennart Poettering 2012-05-21 16:45:43 UTC
Thanks!

Applied!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.