diff options
author | kib <kib@FreeBSD.org> | 2014-01-23 17:24:26 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-01-23 17:24:26 +0000 |
commit | 05b9ae703187e63aca6861f615268abc0b3dba09 (patch) | |
tree | 7046efcb9246a1c8f195bb15bc725e442b315def /sys/compat | |
parent | 608f61d0cf4f63498fd13988fd78da13b219744a (diff) | |
download | FreeBSD-src-05b9ae703187e63aca6861f615268abc0b3dba09.zip FreeBSD-src-05b9ae703187e63aca6861f615268abc0b3dba09.tar.gz |
The posix_fallocate(2) syscall should return error number on error,
without modifying errno.
Reported and tested by: Gennady Proskurin <gpr@mail.ru>
Reviewed by: mdf
PR: standards/186028
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Diffstat (limited to 'sys/compat')
-rw-r--r-- | sys/compat/freebsd32/freebsd32_misc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 719a057..e4ffbe4 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -2995,8 +2995,9 @@ freebsd32_posix_fallocate(struct thread *td, struct freebsd32_posix_fallocate_args *uap) { - return (kern_posix_fallocate(td, uap->fd, - PAIR32TO64(off_t, uap->offset), PAIR32TO64(off_t, uap->len))); + td->td_retval[0] = kern_posix_fallocate(td, uap->fd, + PAIR32TO64(off_t, uap->offset), PAIR32TO64(off_t, uap->len)); + return (0); } int |