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
@@ -171,8 +171,7 @@ fhandler_pipe::fadvise (off_t offset, off_t length, int advice)
|
||||
int
|
||||
fhandler_pipe::ftruncate (off_t length, bool allow_truncate)
|
||||
{
|
||||
set_errno (allow_truncate ? EINVAL : ESPIPE);
|
||||
return -1;
|
||||
return allow_truncate ? EINVAL : ESPIPE;
|
||||
}
|
||||
|
||||
char *
|
||||
|
Reference in New Issue
Block a user