From 8f26a5330a89c272f514bfb8c4320300ea592ddb Mon Sep 17 00:00:00 2001 From: bde Date: Tue, 18 Feb 1997 04:58:11 +0000 Subject: Changed `#ifdef COMPAT_PRELITE2' to `#ifndef NO_COMPAT_PRELITE2' so that the old VFS_VFSCONF sysctl is enabled by default. Initialize the vfc_vfsops field to non-NULL in sysctl_ovfs_conf() so that the old VFS_VFSCONF sysctl actually works. The old (still current) getvfsent.c uses this "kernel-only" field to decide which vfs's are configured (the old implementation returned null entries for unconfigured vfs's). --- sys/kern/vfs_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index 161ff0c..790fb51 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -296,7 +296,7 @@ sysctl_vfs_conf SYSCTL_HANDLER_ARGS SYSCTL_PROC(_vfs, VFS_VFSCONF, vfsconf, CTLTYPE_OPAQUE|CTLFLAG_RD, 0, 0, sysctl_vfs_conf, "S,vfsconf", ""); -#ifdef COMPAT_PRELITE2 +#ifndef NO_COMPAT_PRELITE2 #define OVFS_MAXNAMELEN 32 struct ovfsconf { @@ -317,7 +317,7 @@ sysctl_ovfs_conf SYSCTL_HANDLER_ARGS return EINVAL; for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) { struct ovfsconf ovfs; - ovfs.vfc_vfsops = NULL; + ovfs.vfc_vfsops = vfsp->vfc_vfsops; /* XXX used as flag */ strcpy(ovfs.vfc_name, vfsp->vfc_name); ovfs.vfc_index = vfsp->vfc_typenum; ovfs.vfc_refcount = vfsp->vfc_refcount; @@ -332,7 +332,7 @@ sysctl_ovfs_conf SYSCTL_HANDLER_ARGS SYSCTL_PROC(_vfs, VFS_OVFSCONF, ovfsconf, CTLTYPE_OPAQUE|CTLFLAG_RD, 0, 0, sysctl_ovfs_conf, "S,ovfsconf", ""); -#endif /* COMPAT_PRELITE2 */ +#endif /* !NO_COMPAT_PRELITE2 */ /* * This goop is here to support a loadable NFS module... grumble... -- cgit v1.1