Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Revert previous, which doesn't cover all the cases ...



details:   https://anonhg.NetBSD.org/src/rev/83f2a0604886
branches:  trunk
changeset: 762773:83f2a0604886
user:      dholland <dholland%NetBSD.org@localhost>
date:      Mon Feb 28 03:23:44 2011 +0000

description:
Revert previous, which doesn't cover all the cases if F_OK isn't 0,
and just CTASSERT that it is, as that's not remotely likely to change.
Per source-changes-d; ok by Christos.

diffstat:

 sys/kern/vfs_syscalls.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 5e13a97bb024 -r 83f2a0604886 sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c   Mon Feb 28 00:12:15 2011 +0000
+++ b/sys/kern/vfs_syscalls.c   Mon Feb 28 03:23:44 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_syscalls.c,v 1.416 2011/02/28 00:12:15 christos Exp $      */
+/*     $NetBSD: vfs_syscalls.c,v 1.417 2011/02/28 03:23:44 dholland Exp $      */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.416 2011/02/28 00:12:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.417 2011/02/28 03:23:44 dholland Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_fileassoc.h"
@@ -2484,7 +2484,8 @@
        struct pathbuf *pb;
        struct nameidata nd;
 
-       if ((SCARG(uap, flags) & ~(F_OK | R_OK | W_OK | X_OK)) != 0) {
+       CTASSERT(F_OK == 0);
+       if ((SCARG(uap, flags) & ~(R_OK | W_OK | X_OK)) != 0) {
                /* nonsense flags */
                return EINVAL;
        }



Home | Main Index | Thread Index | Old Index