posix_fallocate() *returns* error codes but does not set errno

Also updates the fhandler_*::ftruncate implementations to adhere to the same
semantics.  The error handling semantics of those syscalls that use
fhandler_*::ftruncate are moved to the implementations of those syscalls (
in particular ftruncate() and friends still set errno and return -1 on error
but that logic is handled in the syscall implementation).
This commit is contained in:
Erik M. Bray
2017-11-02 16:45:35 +01:00
committed by Corinna Vinschen
parent 8c8cdd9ad7
commit 94854321bb
4 changed files with 16 additions and 18 deletions

View File

@@ -1771,8 +1771,7 @@ fhandler_base::fadvise (off_t offset, off_t length, int advice)
int
fhandler_base::ftruncate (off_t length, bool allow_truncate)
{
set_errno (EINVAL);
return -1;
return EINVAL;
}
int