diff options
author | markj <markj@FreeBSD.org> | 2016-02-25 19:58:23 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2016-02-25 19:58:23 +0000 |
commit | 9abb1836d99fb4c4a1fe6181f6021c51675d4adb (patch) | |
tree | b010a81a603d2e4723b6c282351b854c13946c40 /sys/sys/syscallsubr.h | |
parent | 8348d1db13938db7142799dbb0fde84a0719721d (diff) | |
download | FreeBSD-src-9abb1836d99fb4c4a1fe6181f6021c51675d4adb.zip FreeBSD-src-9abb1836d99fb4c4a1fe6181f6021c51675d4adb.tar.gz |
Improve error handling for posix_fallocate(2) and posix_fadvise(2).
- Set td_errno so that ktrace and dtrace can obtain the syscall error
number in the usual way.
- Pass negative error numbers directly to the syscall layer, as they're
not intended to be returned to userland.
Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5425
Diffstat (limited to 'sys/sys/syscallsubr.h')
-rw-r--r-- | sys/sys/syscallsubr.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index f7773f4..a0e58e9 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -158,6 +158,7 @@ int kern_pipe(struct thread *td, int fildes[2], int flags, struct filecaps *fcaps1, struct filecaps *fcaps2); int kern_poll(struct thread *td, struct pollfd *fds, u_int nfds, struct timespec *tsp, sigset_t *uset); +int kern_posix_error(struct thread *td, int error); int kern_posix_fadvise(struct thread *td, int fd, off_t offset, off_t len, int advice); int kern_posix_fallocate(struct thread *td, int fd, off_t offset, |