Author: markj Date: Sat Oct 3 22:27:14 2015 New Revision: 288640 URL: https://svnweb.freebsd.org/changeset/base/288640
Log: Revert r288628 and instead fix a discrepancy between the posix_fadvise(2) man page and POSIX: posix_fadvise(2) returns an error number on failure. Reported by: jilles MFC after: 1 week Modified: head/lib/libc/sys/posix_fadvise.2 head/sys/kern/vfs_syscalls.c Modified: head/lib/libc/sys/posix_fadvise.2 ============================================================================== --- head/lib/libc/sys/posix_fadvise.2 Sat Oct 3 22:26:59 2015 (r288639) +++ head/lib/libc/sys/posix_fadvise.2 Sat Oct 3 22:27:14 2015 (r288640) @@ -28,7 +28,7 @@ .\" @(#)madvise.2 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd January 30, 2014 +.Dd October 3, 2015 .Dt POSIX_FADVISE 2 .Os .Sh NAME @@ -89,11 +89,13 @@ read or written. Future access to this data may require a read operation. .El .Sh RETURN VALUES -.Rv -std posix_fadvise -.Sh ERRORS -The +If successful, .Fn posix_fadvise -system call returns zero on success, and an error on failure: +returns zero. +It returns an error on failure, without setting +.Va errno . +.Sh ERRORS +Possible failure conditions: .Bl -tag -width Er .It Bq Er EBADF The Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sat Oct 3 22:26:59 2015 (r288639) +++ head/sys/kern/vfs_syscalls.c Sat Oct 3 22:27:14 2015 (r288640) @@ -4663,6 +4663,7 @@ int sys_posix_fadvise(struct thread *td, struct posix_fadvise_args *uap) { - return (kern_posix_fadvise(td, uap->fd, uap->offset, uap->len, - uap->advice)); + td->td_retval[0] = kern_posix_fadvise(td, uap->fd, uap->offset, + uap->len, uap->advice); + return (0); } _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"