diff options
Diffstat (limited to 'sys/miscfs')
-rw-r--r-- | sys/miscfs/fifofs/fifo_vnops.c | 15 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_vnops.c | 21 |
2 files changed, 21 insertions, 15 deletions
diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c index 2edeaaf0ba6..cb73bdd09fa 100644 --- a/sys/miscfs/fifofs/fifo_vnops.c +++ b/sys/miscfs/fifofs/fifo_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fifo_vnops.c,v 1.36 2011/07/02 22:20:08 nicm Exp $ */ +/* $OpenBSD: fifo_vnops.c,v 1.37 2012/06/20 17:30:22 matthew Exp $ */ /* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */ /* @@ -408,21 +408,24 @@ int fifo_pathconf(void *v) { struct vop_pathconf_args *ap = v; + int error = 0; switch (ap->a_name) { case _PC_LINK_MAX: *ap->a_retval = LINK_MAX; - return (0); + break; case _PC_PIPE_BUF: *ap->a_retval = PIPE_BUF; - return (0); + break; case _PC_CHOWN_RESTRICTED: *ap->a_retval = 1; - return (0); + break; default: - return (EINVAL); + error = EINVAL; + break; } - /* NOTREACHED */ + + return (error); } /* diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c index be897b61490..45939b1b234 100644 --- a/sys/miscfs/procfs/procfs_vnops.c +++ b/sys/miscfs/procfs/procfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_vnops.c,v 1.54 2012/02/20 22:23:39 guenther Exp $ */ +/* $OpenBSD: procfs_vnops.c,v 1.55 2012/06/20 17:30:22 matthew Exp $ */ /* $NetBSD: procfs_vnops.c,v 1.40 1996/03/16 23:52:55 christos Exp $ */ /* @@ -314,30 +314,33 @@ int procfs_pathconf(void *v) { struct vop_pathconf_args *ap = v; + int error = 0; switch (ap->a_name) { case _PC_LINK_MAX: *ap->a_retval = LINK_MAX; - return (0); + break; case _PC_MAX_CANON: *ap->a_retval = MAX_CANON; - return (0); + break; case _PC_MAX_INPUT: *ap->a_retval = MAX_INPUT; - return (0); + break; case _PC_PIPE_BUF: *ap->a_retval = PIPE_BUF; - return (0); + break; case _PC_CHOWN_RESTRICTED: *ap->a_retval = 1; - return (0); + break; case _PC_VDISABLE: *ap->a_retval = _POSIX_VDISABLE; - return (0); + break; default: - return (EINVAL); + error = EINVAL; + break; } - /* NOTREACHED */ + + return (error); } /* |