diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2012-06-20 17:30:23 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2012-06-20 17:30:23 +0000 |
commit | e3751797b5afd2a18ab6175ce166111383bf99b5 (patch) | |
tree | f8cbc586974f22efee2e9aa738f3f6e29044aa3f /sys/msdosfs/msdosfs_vnops.c | |
parent | 159f5470d216e7cd95c64dc10d61be4b3eab2ac2 (diff) |
Cleanup our filesystem pathconf() code a little bit to make it easier
to diff against FreeBSD's.
From Brad; no object file change on amd64.
Diffstat (limited to 'sys/msdosfs/msdosfs_vnops.c')
-rw-r--r-- | sys/msdosfs/msdosfs_vnops.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c index fbe2d384b52..0bb791d3efd 100644 --- a/sys/msdosfs/msdosfs_vnops.c +++ b/sys/msdosfs/msdosfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msdosfs_vnops.c,v 1.80 2012/02/16 08:58:49 robert Exp $ */ +/* $OpenBSD: msdosfs_vnops.c,v 1.81 2012/06/20 17:30:22 matthew Exp $ */ /* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */ /*- @@ -1798,27 +1798,30 @@ msdosfs_pathconf(void *v) { struct vop_pathconf_args *ap = v; struct msdosfsmount *pmp = VTODE(ap->a_vp)->de_pmp; + int error = 0; switch (ap->a_name) { case _PC_LINK_MAX: *ap->a_retval = 1; - return (0); + break; case _PC_NAME_MAX: *ap->a_retval = pmp->pm_flags & MSDOSFSMNT_LONGNAME ? WIN_MAXLEN : 12; - return (0); + break; case _PC_PATH_MAX: *ap->a_retval = PATH_MAX; - return (0); + break; case _PC_CHOWN_RESTRICTED: *ap->a_retval = 1; - return (0); + break; case _PC_NO_TRUNC: *ap->a_retval = 0; - return (0); + break; default: - return (EINVAL); + error = EINVAL; + break; } - /* NOTREACHED */ + + return (error); } /* |