Author: jh Date: Fri Apr 20 10:08:30 2012 New Revision: 234489 URL: http://svn.freebsd.org/changeset/base/234489
Log: The value of flags matching VNOVAL can't be supported. Return EOPNOTSUPP from setfflags() in this case. This fixes the return value of chflags(path, -1). Discussed with: bde MFC after: 2 weeks Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Fri Apr 20 10:06:28 2012 (r234488) +++ head/sys/kern/vfs_syscalls.c Fri Apr 20 10:08:30 2012 (r234489) @@ -2744,6 +2744,10 @@ setfflags(td, vp, flags) struct mount *mp; struct vattr vattr; + /* We can't support the value matching VNOVAL. */ + if (flags == VNOVAL) + return (EOPNOTSUPP); + /* * Prevent non-root users from setting flags on devices. When * a device is reused, users can retain ownership of the device _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"