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:
committed by
Corinna Vinschen
parent
8c8cdd9ad7
commit
94854321bb
@@ -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
|
||||
|
Reference in New Issue
Block a user