summaryrefslogtreecommitdiff
path: root/sys/msdosfs/msdosfs_vnops.c
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2012-06-20 17:30:23 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2012-06-20 17:30:23 +0000
commite3751797b5afd2a18ab6175ce166111383bf99b5 (patch)
treef8cbc586974f22efee2e9aa738f3f6e29044aa3f /sys/msdosfs/msdosfs_vnops.c
parent159f5470d216e7cd95c64dc10d61be4b3eab2ac2 (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.c19
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);
}
/*