Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/nfs Introduce genfs_pathconf() and use it for the defaul...
details: https://anonhg.NetBSD.org/src/rev/bf81731d8485
branches: trunk
changeset: 935218:bf81731d8485
user: christos <christos%NetBSD.org@localhost>
date: Sat Jun 27 17:29:17 2020 +0000
description:
Introduce genfs_pathconf() and use it for the default case in all filesystems.
diffstat:
sys/fs/adosfs/advnops.c | 6 +-
sys/fs/cd9660/cd9660_vnops.c | 6 +-
sys/fs/efs/efs_vnops.c | 6 +-
sys/fs/filecorefs/filecore_vnops.c | 6 +-
sys/fs/msdosfs/msdosfs_vnops.c | 6 +-
sys/fs/nilfs/nilfs_vnops.c | 8 ++--
sys/fs/ntfs/ntfs_vnops.c | 6 +-
sys/fs/ptyfs/ptyfs_vnops.c | 6 +-
sys/fs/sysvbfs/sysvbfs_vnops.c | 24 ++++++---------
sys/fs/tmpfs/tmpfs_vnops.c | 27 +++++++---------
sys/fs/udf/udf_vnops.c | 8 ++--
sys/fs/v7fs/v7fs_vnops.c | 59 +++++++++++++++++--------------------
sys/miscfs/fdesc/fdesc_vnops.c | 6 +-
sys/miscfs/fifofs/fifo_vnops.c | 6 +-
sys/miscfs/genfs/genfs.h | 3 +-
sys/miscfs/genfs/genfs_vnops.c | 30 ++++++++++++++++++-
sys/miscfs/kernfs/kernfs_vnops.c | 6 +-
sys/miscfs/procfs/procfs_vnops.c | 6 +-
sys/miscfs/specfs/spec_vnops.c | 6 +-
sys/nfs/nfs_vnops.c | 6 +-
20 files changed, 126 insertions(+), 111 deletions(-)
diffs (truncated from 701 to 300 lines):
diff -r 2c31942f034b -r bf81731d8485 sys/fs/adosfs/advnops.c
--- a/sys/fs/adosfs/advnops.c Sat Jun 27 17:27:59 2020 +0000
+++ b/sys/fs/adosfs/advnops.c Sat Jun 27 17:29:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: advnops.c,v 1.54 2020/05/16 18:31:48 christos Exp $ */
+/* $NetBSD: advnops.c,v 1.55 2020/06/27 17:29:17 christos Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: advnops.c,v 1.54 2020/05/16 18:31:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: advnops.c,v 1.55 2020/06/27 17:29:17 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -931,7 +931,7 @@
*ap->a_retval = 32;
return (0);
default:
- return (EINVAL);
+ return genfs_pathconf(ap);
}
/* NOTREACHED */
}
diff -r 2c31942f034b -r bf81731d8485 sys/fs/cd9660/cd9660_vnops.c
--- a/sys/fs/cd9660/cd9660_vnops.c Sat Jun 27 17:27:59 2020 +0000
+++ b/sys/fs/cd9660/cd9660_vnops.c Sat Jun 27 17:29:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_vnops.c,v 1.57 2020/05/16 18:31:48 christos Exp $ */
+/* $NetBSD: cd9660_vnops.c,v 1.58 2020/06/27 17:29:17 christos Exp $ */
/*-
* Copyright (c) 1994
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd9660_vnops.c,v 1.57 2020/05/16 18:31:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_vnops.c,v 1.58 2020/06/27 17:29:17 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -779,7 +779,7 @@
*ap->a_retval = 32;
return (0);
default:
- return (EINVAL);
+ return genfs_pathconf(ap);
}
/* NOTREACHED */
}
diff -r 2c31942f034b -r bf81731d8485 sys/fs/efs/efs_vnops.c
--- a/sys/fs/efs/efs_vnops.c Sat Jun 27 17:27:59 2020 +0000
+++ b/sys/fs/efs/efs_vnops.c Sat Jun 27 17:29:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efs_vnops.c,v 1.40 2020/05/16 18:31:48 christos Exp $ */
+/* $NetBSD: efs_vnops.c,v 1.41 2020/06/27 17:29:17 christos Exp $ */
/*
* Copyright (c) 2006 Stephen M. Rumble <rumble%ephemeral.org@localhost>
@@ -17,7 +17,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: efs_vnops.c,v 1.40 2020/05/16 18:31:48 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efs_vnops.c,v 1.41 2020/06/27 17:29:17 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -757,7 +757,7 @@
*ap->a_retval = 32;
break;
default:
- return (EINVAL);
+ return genfs_pathconf(ap);
}
return (0);
diff -r 2c31942f034b -r bf81731d8485 sys/fs/filecorefs/filecore_vnops.c
--- a/sys/fs/filecorefs/filecore_vnops.c Sat Jun 27 17:27:59 2020 +0000
+++ b/sys/fs/filecorefs/filecore_vnops.c Sat Jun 27 17:29:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: filecore_vnops.c,v 1.46 2020/05/16 18:31:49 christos Exp $ */
+/* $NetBSD: filecore_vnops.c,v 1.47 2020/06/27 17:29:18 christos Exp $ */
/*-
* Copyright (c) 1994 The Regents of the University of California.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: filecore_vnops.c,v 1.46 2020/05/16 18:31:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: filecore_vnops.c,v 1.47 2020/06/27 17:29:18 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -525,7 +525,7 @@
*ap->a_retval = 32;
return (0);
default:
- return (EINVAL);
+ return genfs_pathconf(ap);
}
/* NOTREACHED */
}
diff -r 2c31942f034b -r bf81731d8485 sys/fs/msdosfs/msdosfs_vnops.c
--- a/sys/fs/msdosfs/msdosfs_vnops.c Sat Jun 27 17:27:59 2020 +0000
+++ b/sys/fs/msdosfs/msdosfs_vnops.c Sat Jun 27 17:29:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_vnops.c,v 1.103 2020/05/16 18:31:49 christos Exp $ */
+/* $NetBSD: msdosfs_vnops.c,v 1.104 2020/06/27 17:29:18 christos Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.103 2020/05/16 18:31:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_vnops.c,v 1.104 2020/06/27 17:29:18 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1765,7 +1765,7 @@
*ap->a_retval = 32;
return (0);
default:
- return (EINVAL);
+ return genfs_pathconf(ap);
}
/* NOTREACHED */
}
diff -r 2c31942f034b -r bf81731d8485 sys/fs/nilfs/nilfs_vnops.c
--- a/sys/fs/nilfs/nilfs_vnops.c Sat Jun 27 17:27:59 2020 +0000
+++ b/sys/fs/nilfs/nilfs_vnops.c Sat Jun 27 17:29:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nilfs_vnops.c,v 1.41 2020/05/16 18:31:49 christos Exp $ */
+/* $NetBSD: nilfs_vnops.c,v 1.42 2020/06/27 17:29:18 christos Exp $ */
/*
* Copyright (c) 2008, 2009 Reinoud Zandijk
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: nilfs_vnops.c,v 1.41 2020/05/16 18:31:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nilfs_vnops.c,v 1.42 2020/06/27 17:29:18 christos Exp $");
#endif /* not lint */
@@ -926,9 +926,9 @@
#endif
*ap->a_retval = bits;
return 0;
+ default:
+ return genfs_pathconf(ap);
}
-
- return EINVAL;
}
diff -r 2c31942f034b -r bf81731d8485 sys/fs/ntfs/ntfs_vnops.c
--- a/sys/fs/ntfs/ntfs_vnops.c Sat Jun 27 17:27:59 2020 +0000
+++ b/sys/fs/ntfs/ntfs_vnops.c Sat Jun 27 17:29:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ntfs_vnops.c,v 1.64 2020/05/16 18:31:49 christos Exp $ */
+/* $NetBSD: ntfs_vnops.c,v 1.65 2020/06/27 17:29:18 christos Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ntfs_vnops.c,v 1.64 2020/05/16 18:31:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ntfs_vnops.c,v 1.65 2020/06/27 17:29:18 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -796,7 +796,7 @@
*ap->a_retval = 64;
return (0);
default:
- return (EINVAL);
+ return genfs_pathconf(ap);
}
/* NOTREACHED */
}
diff -r 2c31942f034b -r bf81731d8485 sys/fs/ptyfs/ptyfs_vnops.c
--- a/sys/fs/ptyfs/ptyfs_vnops.c Sat Jun 27 17:27:59 2020 +0000
+++ b/sys/fs/ptyfs/ptyfs_vnops.c Sat Jun 27 17:29:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ptyfs_vnops.c,v 1.59 2020/05/16 18:31:49 christos Exp $ */
+/* $NetBSD: ptyfs_vnops.c,v 1.60 2020/06/27 17:29:18 christos Exp $ */
/*
* Copyright (c) 1993, 1995
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.59 2020/05/16 18:31:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vnops.c,v 1.60 2020/06/27 17:29:18 christos Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -282,7 +282,7 @@
*ap->a_retval = 1;
return 0;
default:
- return EINVAL;
+ return genfs_pathconf(ap);
}
}
diff -r 2c31942f034b -r bf81731d8485 sys/fs/sysvbfs/sysvbfs_vnops.c
--- a/sys/fs/sysvbfs/sysvbfs_vnops.c Sat Jun 27 17:27:59 2020 +0000
+++ b/sys/fs/sysvbfs/sysvbfs_vnops.c Sat Jun 27 17:29:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysvbfs_vnops.c,v 1.66 2020/05/16 18:31:49 christos Exp $ */
+/* $NetBSD: sysvbfs_vnops.c,v 1.67 2020/06/27 17:29:18 christos Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vnops.c,v 1.66 2020/05/16 18:31:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vnops.c,v 1.67 2020/06/27 17:29:18 christos Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -828,38 +828,34 @@
int a_name;
register_t *a_retval;
} */ *ap = v;
- int err = 0;
DPRINTF("%s:\n", __func__);
switch (ap->a_name) {
case _PC_LINK_MAX:
*ap->a_retval = 1;
- break;
+ return 0;
case _PC_NAME_MAX:
*ap->a_retval = BFS_FILENAME_MAXLEN;
- break;
+ return 0;
case _PC_PATH_MAX:
*ap->a_retval = BFS_FILENAME_MAXLEN;
- break;
+ return 0;
case _PC_CHOWN_RESTRICTED:
*ap->a_retval = 1;
- break;
+ return 0;
case _PC_NO_TRUNC:
*ap->a_retval = 0;
- break;
+ return 0;
case _PC_SYNC_IO:
*ap->a_retval = 1;
- break;
+ return 0;
case _PC_FILESIZEBITS:
*ap->a_retval = 32;
- break;
+ return 0;
default:
- err = EINVAL;
- break;
+ return genfs_pathconf(ap);
}
-
- return err;
}
int
diff -r 2c31942f034b -r bf81731d8485 sys/fs/tmpfs/tmpfs_vnops.c
--- a/sys/fs/tmpfs/tmpfs_vnops.c Sat Jun 27 17:27:59 2020 +0000
+++ b/sys/fs/tmpfs/tmpfs_vnops.c Sat Jun 27 17:29:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tmpfs_vnops.c,v 1.142 2020/05/24 20:08:26 ad Exp $ */
+/* $NetBSD: tmpfs_vnops.c,v 1.143 2020/06/27 17:29:18 christos Exp $ */
/*
* Copyright (c) 2005, 2006, 2007, 2020 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.142 2020/05/24 20:08:26 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tmpfs_vnops.c,v 1.143 2020/06/27 17:29:18 christos Exp $");
Home |
Main Index |
Thread Index |
Old Index