summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-03-02 17:53:37 +0000
committerbde <bde@FreeBSD.org>1997-03-02 17:53:37 +0000
commita42104c77dcbbed3bed9d1c5bc5934a7b98d6f5a (patch)
treed7952f15cc87c2009fe3d3ae4143cc20cbef095f
parent94009b04741909f9c3c8801ef9f3e5268d91885c (diff)
downloadFreeBSD-src-a42104c77dcbbed3bed9d1c5bc5934a7b98d6f5a.zip
FreeBSD-src-a42104c77dcbbed3bed9d1c5bc5934a7b98d6f5a.tar.gz
Restored some pre-Lite2-merge source-level compatibility to the mount()
and getvfsbyname() interfaces. The new interfaces are now hidden from applications unless _NEW_VFSCONF is defined. The new vfsconf interfaces don't work yet.
-rw-r--r--sys/kern/vfs_export.c15
-rw-r--r--sys/kern/vfs_subr.c15
-rw-r--r--sys/sys/mount.h34
3 files changed, 33 insertions, 31 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index bb95ab3..03cb4d1 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
- * $Id: vfs_subr.c,v 1.75 1997/02/27 16:08:43 bde Exp $
+ * $Id: vfs_subr.c,v 1.76 1997/03/02 11:06:22 bde Exp $
*/
/*
@@ -1644,6 +1644,7 @@ printlockedvnodes()
}
#endif
+#ifdef notyet
static int
sysctl_vfs_conf SYSCTL_HANDLER_ARGS
{
@@ -1662,18 +1663,10 @@ sysctl_vfs_conf SYSCTL_HANDLER_ARGS
SYSCTL_PROC(_vfs, VFS_VFSCONF, vfsconf, CTLTYPE_OPAQUE|CTLFLAG_RD,
0, 0, sysctl_vfs_conf, "S,vfsconf", "");
+#endif
#ifndef NO_COMPAT_PRELITE2
-#define OVFS_MAXNAMELEN 32
-struct ovfsconf {
- void *vfc_vfsops;
- char vfc_name[OVFS_MAXNAMELEN];
- int vfc_index;
- int vfc_refcount;
- int vfc_flags;
-};
-
static int
sysctl_ovfs_conf SYSCTL_HANDLER_ARGS
{
@@ -1696,7 +1689,7 @@ sysctl_ovfs_conf SYSCTL_HANDLER_ARGS
return 0;
}
-SYSCTL_PROC(_vfs, VFS_OVFSCONF, ovfsconf, CTLTYPE_OPAQUE|CTLFLAG_RD,
+SYSCTL_PROC(_vfs, VFS_VFSCONF, ovfsconf, CTLTYPE_OPAQUE|CTLFLAG_RD,
0, 0, sysctl_ovfs_conf, "S,ovfsconf", "");
#endif /* !NO_COMPAT_PRELITE2 */
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index bb95ab3..03cb4d1 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
- * $Id: vfs_subr.c,v 1.75 1997/02/27 16:08:43 bde Exp $
+ * $Id: vfs_subr.c,v 1.76 1997/03/02 11:06:22 bde Exp $
*/
/*
@@ -1644,6 +1644,7 @@ printlockedvnodes()
}
#endif
+#ifdef notyet
static int
sysctl_vfs_conf SYSCTL_HANDLER_ARGS
{
@@ -1662,18 +1663,10 @@ sysctl_vfs_conf SYSCTL_HANDLER_ARGS
SYSCTL_PROC(_vfs, VFS_VFSCONF, vfsconf, CTLTYPE_OPAQUE|CTLFLAG_RD,
0, 0, sysctl_vfs_conf, "S,vfsconf", "");
+#endif
#ifndef NO_COMPAT_PRELITE2
-#define OVFS_MAXNAMELEN 32
-struct ovfsconf {
- void *vfc_vfsops;
- char vfc_name[OVFS_MAXNAMELEN];
- int vfc_index;
- int vfc_refcount;
- int vfc_flags;
-};
-
static int
sysctl_ovfs_conf SYSCTL_HANDLER_ARGS
{
@@ -1696,7 +1689,7 @@ sysctl_ovfs_conf SYSCTL_HANDLER_ARGS
return 0;
}
-SYSCTL_PROC(_vfs, VFS_OVFSCONF, ovfsconf, CTLTYPE_OPAQUE|CTLFLAG_RD,
+SYSCTL_PROC(_vfs, VFS_VFSCONF, ovfsconf, CTLTYPE_OPAQUE|CTLFLAG_RD,
0, 0, sysctl_ovfs_conf, "S,ovfsconf", "");
#endif /* !NO_COMPAT_PRELITE2 */
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index a397d4a..99dfe83 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)mount.h 8.21 (Berkeley) 5/20/95
- * $Id$
+ * $Id: mount.h,v 1.39 1997/02/22 09:45:35 peter Exp $
*/
#ifndef _SYS_MOUNT_H_
@@ -214,12 +214,11 @@ struct mount {
* Sysctl CTL_VFS definitions.
*
* Second level identifier specifies which filesystem. Second level
- * identifier VFS_GENERIC returns information about all filesystems.
+ * identifier VFS_VFSCONF returns information about all filesystems.
+ * Second level identifier VFS_GENERIC is non-terminal.
*/
-#ifdef notyet
+#define VFS_VFSCONF 0 /* get configured filesystems */
#define VFS_GENERIC 0 /* generic filesystem information */
-#endif
-#define VFS_OVFSCONF 0 /* for backward compatibility w/ FreeBSD 2.1 */
/*
* Third level identifiers for VFS_GENERIC are given below; third
* level identifiers for specific filesystems are given in their
@@ -228,7 +227,6 @@ struct mount {
#define VFS_MAXTYPENUM 1 /* int: highest defined filesystem type */
#define VFS_CONF 2 /* struct: vfsconf for filesystem given
as next argument */
-#define VFS_VFSCONF 3 /* for backward compatibility w/ FreeBSD 2.1 */
/*
* Flags for various system call interfaces.
@@ -274,6 +272,14 @@ struct vfsconf {
struct vfsconf *vfc_next; /* next in list */
};
+struct ovfsconf {
+ void *vfc_vfsops;
+ char vfc_name[32];
+ int vfc_index;
+ int vfc_refcount;
+ int vfc_flags;
+};
+
/*
* NB: these flags refer to IMPLEMENTATION properties, not properties of
* any actual mounts; i.e., it does not make sense to change the flags.
@@ -422,14 +428,24 @@ int fstatfs __P((int, struct statfs *));
int getfh __P((const char *, fhandle_t *));
int getfsstat __P((struct statfs *, long, int));
int getmntinfo __P((struct statfs **, int));
+#ifdef _NEW_VFSCONF
int mount __P((const char *, const char *, int, void *));
+#else
+int mount __P((int, const char *, int, void *));
+#endif
int statfs __P((const char *, struct statfs *));
int unmount __P((const char *, int));
/* C library stuff */
-struct vfsconf *getvfsbyname __P((const char *));
-struct vfsconf *getvfsbytype __P((int));
-struct vfsconf *getvfsent __P((void));
+#ifdef _NEW_VFSCONF
+#define getvfsbyname(name, vfsp) new_getvfsbyname((name), (vfsp))
+int new_getvfsbyname __P((const char *, struct vfsconf *));
+#else
+#define vfsconf ovfsconf
+struct ovfsconf *getvfsbyname __P((const char *));
+struct ovfsconf *getvfsbytype __P((int));
+struct ovfsconf *getvfsent __P((void));
+#endif
void setvfsent __P((int));
void endvfsent __P((void));
int vfsisloadable __P((const char *));
OpenPOWER on IntegriCloud