Removed statically configured mount type numbers (MOUNT_*) and all

references to them.

The change a couple of days ago to ignore these numbers in statically
configured vfsconf structs was slightly premature because the cd9660,
cfs, devfs, ext2fs, nfs vfs's still used MOUNT_* instead of the number
in their vfsconf struct.
This commit is contained in:
Bruce Evans 1998-09-07 13:17:06 +00:00
parent ef949dd17d
commit 8994ca3ce9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=38909
28 changed files with 83 additions and 123 deletions

View File

@ -27,7 +27,7 @@
* Mellon the rights to redistribute these changes without encumbrance.
*
* @(#) src/sys/cfs/cfs_vfsops.c,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
* $Id: $
* $Id: cfs_vfsops.c,v 1.2 1998/09/02 19:09:53 rvb Exp $
*
*/
@ -47,6 +47,9 @@
/*
* HISTORY
* $Log: cfs_vfsops.c,v $
* Revision 1.2 1998/09/02 19:09:53 rvb
* Pass2 complete
*
* Revision 1.1.1.1 1998/08/29 21:14:52 rvb
* Very Preliminary Coda
*
@ -232,7 +235,7 @@ struct vfsops cfs_vfsops = {
cfs_init,
};
VFS_SET(cfs_vfsops, cfs, MOUNT_CFS, VFCF_NETWORK);
VFS_SET(cfs_vfsops, cfs, VFCF_NETWORK);
int
cfs_vfsopstats_init(void)
@ -565,7 +568,7 @@ cfs_nb_statfs(vfsp, sbp, p)
#define NB_SFS_SIZ 0x895440
*/
/* Note: Normal fs's have a bsize of 0x400 == 1024 */
sbp->f_type = MOUNT_CFS;
sbp->f_type = vfsp->mnt_vfc->vfc_typenum;
sbp->f_bsize = 8192; /* XXX */
sbp->f_iosize = 8192; /* XXX */
#define NB_SFS_SIZ 0x8AB75D

View File

@ -27,7 +27,7 @@
* Mellon the rights to redistribute these changes without encumbrance.
*
* @(#) src/sys/cfs/cfs_vfsops.c,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
* $Id: $
* $Id: cfs_vfsops.c,v 1.2 1998/09/02 19:09:53 rvb Exp $
*
*/
@ -47,6 +47,9 @@
/*
* HISTORY
* $Log: cfs_vfsops.c,v $
* Revision 1.2 1998/09/02 19:09:53 rvb
* Pass2 complete
*
* Revision 1.1.1.1 1998/08/29 21:14:52 rvb
* Very Preliminary Coda
*
@ -232,7 +235,7 @@ struct vfsops cfs_vfsops = {
cfs_init,
};
VFS_SET(cfs_vfsops, cfs, MOUNT_CFS, VFCF_NETWORK);
VFS_SET(cfs_vfsops, cfs, VFCF_NETWORK);
int
cfs_vfsopstats_init(void)
@ -565,7 +568,7 @@ cfs_nb_statfs(vfsp, sbp, p)
#define NB_SFS_SIZ 0x895440
*/
/* Note: Normal fs's have a bsize of 0x400 == 1024 */
sbp->f_type = MOUNT_CFS;
sbp->f_type = vfsp->mnt_vfc->vfc_typenum;
sbp->f_bsize = 8192; /* XXX */
sbp->f_iosize = 8192; /* XXX */
#define NB_SFS_SIZ 0x8AB75D

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95
* $Id: cd9660_vfsops.c,v 1.41 1998/07/04 22:30:21 julian Exp $
* $Id: cd9660_vfsops.c,v 1.42 1998/09/07 07:20:30 guido Exp $
*/
#include <sys/param.h>
@ -90,7 +90,7 @@ static struct vfsops cd9660_vfsops = {
cd9660_vptofh,
cd9660_init
};
VFS_SET(cd9660_vfsops, cd9660, MOUNT_CD9660, VFCF_READONLY);
VFS_SET(cd9660_vfsops, cd9660, VFCF_READONLY);
/*
@ -582,7 +582,6 @@ cd9660_statfs(mp, sbp, p)
isomp = VFSTOISOFS(mp);
sbp->f_type = MOUNT_CD9660;
sbp->f_bsize = isomp->logical_block_size;
sbp->f_iosize = sbp->f_bsize; /* XXX */
sbp->f_blocks = isomp->volume_space_size;
@ -591,6 +590,7 @@ cd9660_statfs(mp, sbp, p)
sbp->f_files = 0; /* total files */
sbp->f_ffree = 0; /* free file nodes */
if (sbp != &mp->mnt_stat) {
sbp->f_type = mp->mnt_vfc->vfc_typenum;
bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN);
bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN);
}

View File

@ -27,7 +27,7 @@
* Mellon the rights to redistribute these changes without encumbrance.
*
* @(#) src/sys/cfs/cfs_vfsops.c,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
* $Id: $
* $Id: cfs_vfsops.c,v 1.2 1998/09/02 19:09:53 rvb Exp $
*
*/
@ -47,6 +47,9 @@
/*
* HISTORY
* $Log: cfs_vfsops.c,v $
* Revision 1.2 1998/09/02 19:09:53 rvb
* Pass2 complete
*
* Revision 1.1.1.1 1998/08/29 21:14:52 rvb
* Very Preliminary Coda
*
@ -232,7 +235,7 @@ struct vfsops cfs_vfsops = {
cfs_init,
};
VFS_SET(cfs_vfsops, cfs, MOUNT_CFS, VFCF_NETWORK);
VFS_SET(cfs_vfsops, cfs, VFCF_NETWORK);
int
cfs_vfsopstats_init(void)
@ -565,7 +568,7 @@ cfs_nb_statfs(vfsp, sbp, p)
#define NB_SFS_SIZ 0x895440
*/
/* Note: Normal fs's have a bsize of 0x400 == 1024 */
sbp->f_type = MOUNT_CFS;
sbp->f_type = vfsp->mnt_vfc->vfc_typenum;
sbp->f_bsize = 8192; /* XXX */
sbp->f_iosize = 8192; /* XXX */
#define NB_SFS_SIZ 0x8AB75D

View File

@ -35,7 +35,7 @@
*
* @(#)fdesc_vfsops.c 8.4 (Berkeley) 1/21/94
*
* $Id: fdesc_vfsops.c,v 1.14 1998/03/01 22:46:10 msmith Exp $
* $Id: fdesc_vfsops.c,v 1.15 1998/05/06 05:29:33 msmith Exp $
*/
/*
@ -269,4 +269,4 @@ static struct vfsops fdesc_vfsops = {
fdesc_init,
};
VFS_SET(fdesc_vfsops, fdesc, MOUNT_FDESC, VFCF_SYNTHETIC);
VFS_SET(fdesc_vfsops, fdesc, VFCF_SYNTHETIC);

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_vfsops.c,v 1.34 1998/04/29 12:55:51 dt Exp $ */
/* $Id: msdosfs_vfsops.c,v 1.35 1998/05/06 05:29:38 msmith Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */
/*-
@ -1015,4 +1015,4 @@ static struct vfsops msdosfs_vfsops = {
msdosfs_init
};
VFS_SET(msdosfs_vfsops, msdos, MOUNT_MSDOS, 0);
VFS_SET(msdosfs_vfsops, msdos, 0);

View File

@ -36,7 +36,7 @@
* @(#)null_vfsops.c 8.2 (Berkeley) 1/21/94
*
* @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92
* $Id: null_vfsops.c,v 1.26 1998/05/06 05:29:34 msmith Exp $
* $Id: null_vfsops.c,v 1.27 1998/07/30 17:40:45 bde Exp $
*/
/*
@ -422,4 +422,4 @@ static struct vfsops null_vfsops = {
nullfs_init,
};
VFS_SET(null_vfsops, null, MOUNT_NULL, VFCF_LOOPBACK);
VFS_SET(null_vfsops, null, VFCF_LOOPBACK);

View File

@ -35,7 +35,7 @@
*
* @(#)portal_vfsops.c 8.11 (Berkeley) 5/14/95
*
* $Id: portal_vfsops.c,v 1.20 1998/03/01 22:46:20 msmith Exp $
* $Id: portal_vfsops.c,v 1.21 1998/05/06 05:29:35 msmith Exp $
*/
/*
@ -289,4 +289,4 @@ static struct vfsops portal_vfsops = {
portal_init,
};
VFS_SET(portal_vfsops, portal, MOUNT_PORTAL, VFCF_SYNTHETIC);
VFS_SET(portal_vfsops, portal, VFCF_SYNTHETIC);

View File

@ -36,7 +36,7 @@
*
* @(#)procfs_vfsops.c 8.7 (Berkeley) 5/10/95
*
* $Id: procfs_vfsops.c,v 1.24 1998/07/27 01:07:01 alex Exp $
* $Id: procfs_vfsops.c,v 1.25 1998/07/27 22:47:17 alex Exp $
*/
/*
@ -212,4 +212,4 @@ static struct vfsops procfs_vfsops = {
procfs_init,
};
VFS_SET(procfs_vfsops, procfs, MOUNT_PROCFS, VFCF_SYNTHETIC);
VFS_SET(procfs_vfsops, procfs, VFCF_SYNTHETIC);

View File

@ -35,7 +35,7 @@
*
* @(#)umap_vfsops.c 8.8 (Berkeley) 5/14/95
*
* $Id: umap_vfsops.c,v 1.21 1998/03/01 22:46:24 msmith Exp $
* $Id: umap_vfsops.c,v 1.22 1998/05/06 05:29:36 msmith Exp $
*/
/*
@ -428,4 +428,4 @@ static struct vfsops umap_vfsops = {
umapfs_init,
};
VFS_SET(umap_vfsops, umap, MOUNT_UMAP, VFCF_LOOPBACK);
VFS_SET(umap_vfsops, umap, VFCF_LOOPBACK);

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_vfsops.c 8.20 (Berkeley) 5/20/95
* $Id: union_vfsops.c,v 1.28 1998/04/17 22:36:56 des Exp $
* $Id: union_vfsops.c,v 1.29 1998/05/06 05:29:37 msmith Exp $
*/
/*
@ -552,4 +552,4 @@ static struct vfsops union_vfsops = {
union_init,
};
VFS_SET(union_vfsops, union, MOUNT_UNION, VFCF_LOOPBACK);
VFS_SET(union_vfsops, union, VFCF_LOOPBACK);

View File

@ -98,7 +98,7 @@ static struct vfsops ext2fs_vfsops = {
ext2_init,
};
VFS_SET(ext2fs_vfsops, ext2fs, MOUNT_EXT2FS, 0);
VFS_SET(ext2fs_vfsops, ext2fs, 0);
#define bsd_malloc malloc
#define bsd_free free
@ -633,7 +633,7 @@ ext2_mountfs(devvp, mp, p)
}
mp->mnt_data = (qaddr_t)ump;
mp->mnt_stat.f_fsid.val[0] = (long)dev;
mp->mnt_stat.f_fsid.val[1] = MOUNT_EXT2FS;
mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum;
mp->mnt_maxsymlinklen = EXT2_MAXSYMLINKLEN;
mp->mnt_flag |= MNT_LOCAL;
ump->um_mountp = mp;
@ -787,7 +787,6 @@ ext2_statfs(mp, sbp, p)
overhead = es->s_first_data_block +
fs->s_groups_count * overhead_per_group;
sbp->f_type = MOUNT_EXT2FS;
sbp->f_bsize = EXT2_FRAG_SIZE(fs);
sbp->f_iosize = EXT2_BLOCK_SIZE(fs);
sbp->f_blocks = es->s_blocks_count - overhead;
@ -796,6 +795,7 @@ ext2_statfs(mp, sbp, p)
sbp->f_files = es->s_inodes_count;
sbp->f_ffree = es->s_free_inodes_count;
if (sbp != &mp->mnt_stat) {
sbp->f_type = mp->mnt_vfc->vfc_typenum;
bcopy((caddr_t)mp->mnt_stat.f_mntonname,
(caddr_t)&sbp->f_mntonname[0], MNAMELEN);
bcopy((caddr_t)mp->mnt_stat.f_mntfromname,

View File

@ -98,7 +98,7 @@ static struct vfsops ext2fs_vfsops = {
ext2_init,
};
VFS_SET(ext2fs_vfsops, ext2fs, MOUNT_EXT2FS, 0);
VFS_SET(ext2fs_vfsops, ext2fs, 0);
#define bsd_malloc malloc
#define bsd_free free
@ -633,7 +633,7 @@ ext2_mountfs(devvp, mp, p)
}
mp->mnt_data = (qaddr_t)ump;
mp->mnt_stat.f_fsid.val[0] = (long)dev;
mp->mnt_stat.f_fsid.val[1] = MOUNT_EXT2FS;
mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum;
mp->mnt_maxsymlinklen = EXT2_MAXSYMLINKLEN;
mp->mnt_flag |= MNT_LOCAL;
ump->um_mountp = mp;
@ -787,7 +787,6 @@ ext2_statfs(mp, sbp, p)
overhead = es->s_first_data_block +
fs->s_groups_count * overhead_per_group;
sbp->f_type = MOUNT_EXT2FS;
sbp->f_bsize = EXT2_FRAG_SIZE(fs);
sbp->f_iosize = EXT2_BLOCK_SIZE(fs);
sbp->f_blocks = es->s_blocks_count - overhead;
@ -796,6 +795,7 @@ ext2_statfs(mp, sbp, p)
sbp->f_files = es->s_inodes_count;
sbp->f_ffree = es->s_free_inodes_count;
if (sbp != &mp->mnt_stat) {
sbp->f_type = mp->mnt_vfc->vfc_typenum;
bcopy((caddr_t)mp->mnt_stat.f_mntonname,
(caddr_t)&sbp->f_mntonname[0], MNAMELEN);
bcopy((caddr_t)mp->mnt_stat.f_mntfromname,

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95
* $Id: cd9660_vfsops.c,v 1.41 1998/07/04 22:30:21 julian Exp $
* $Id: cd9660_vfsops.c,v 1.42 1998/09/07 07:20:30 guido Exp $
*/
#include <sys/param.h>
@ -90,7 +90,7 @@ static struct vfsops cd9660_vfsops = {
cd9660_vptofh,
cd9660_init
};
VFS_SET(cd9660_vfsops, cd9660, MOUNT_CD9660, VFCF_READONLY);
VFS_SET(cd9660_vfsops, cd9660, VFCF_READONLY);
/*
@ -582,7 +582,6 @@ cd9660_statfs(mp, sbp, p)
isomp = VFSTOISOFS(mp);
sbp->f_type = MOUNT_CD9660;
sbp->f_bsize = isomp->logical_block_size;
sbp->f_iosize = sbp->f_bsize; /* XXX */
sbp->f_blocks = isomp->volume_space_size;
@ -591,6 +590,7 @@ cd9660_statfs(mp, sbp, p)
sbp->f_files = 0; /* total files */
sbp->f_ffree = 0; /* free file nodes */
if (sbp != &mp->mnt_stat) {
sbp->f_type = mp->mnt_vfc->vfc_typenum;
bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN);
bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN);
}

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: devfs_vfsops.c,v 1.30 1998/05/06 05:29:32 msmith Exp $
* $Id: devfs_vfsops.c,v 1.31 1998/08/16 01:21:51 bde Exp $
*
*/
@ -122,9 +122,9 @@ DBPRINT(("mount "));
* Fill out some fields
*/
mp->mnt_data = (qaddr_t)devfs_mp_p;
mp->mnt_stat.f_type = MOUNT_DEVFS;
mp->mnt_stat.f_type = mp->mnt_vfc->vfc_typenum;
mp->mnt_stat.f_fsid.val[0] = (intptr_t)(void *)devfs_mp_p;
mp->mnt_stat.f_fsid.val[1] = MOUNT_DEVFS;
mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum;
mp->mnt_flag |= MNT_LOCAL;
if(error = dev_dup_plane(devfs_mp_p))
@ -219,7 +219,7 @@ devfs_statfs( struct mount *mp, struct statfs *sbp, struct proc *p)
* Fill in the stat block.
*/
DBPRINT(("statfs "));
sbp->f_type = MOUNT_DEVFS;
sbp->f_type = mp->mnt_stat.f_type;
sbp->f_flags = 0; /* XXX */
sbp->f_bsize = 128;
sbp->f_iosize = 1024; /* XXX*/
@ -229,7 +229,7 @@ DBPRINT(("statfs "));
sbp->f_files = 128;
sbp->f_ffree = 0; /* what to put in here? */
sbp->f_fsid.val[0] = (intptr_t)(void *)devfs_mp_p;
sbp->f_fsid.val[1] = MOUNT_DEVFS;
sbp->f_fsid.val[1] = mp->mnt_stat.f_type;
/*-
* Copy the mounted on and mounted from names into
@ -347,4 +347,4 @@ static struct vfsops devfs_vfsops = {
devfs_init
};
VFS_SET(devfs_vfsops, devfs, MOUNT_DEVFS, 0);
VFS_SET(devfs_vfsops, devfs, 0);

View File

@ -35,7 +35,7 @@
*
* @(#)fdesc_vfsops.c 8.4 (Berkeley) 1/21/94
*
* $Id: fdesc_vfsops.c,v 1.14 1998/03/01 22:46:10 msmith Exp $
* $Id: fdesc_vfsops.c,v 1.15 1998/05/06 05:29:33 msmith Exp $
*/
/*
@ -269,4 +269,4 @@ static struct vfsops fdesc_vfsops = {
fdesc_init,
};
VFS_SET(fdesc_vfsops, fdesc, MOUNT_FDESC, VFCF_SYNTHETIC);
VFS_SET(fdesc_vfsops, fdesc, VFCF_SYNTHETIC);

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)kernfs_vfsops.c 8.10 (Berkeley) 5/14/95
* $Id: kernfs_vfsops.c,v 1.21 1998/03/01 22:46:12 msmith Exp $
* $Id: kernfs_vfsops.c,v 1.22 1998/05/06 05:29:33 msmith Exp $
*/
/*
@ -283,4 +283,4 @@ static struct vfsops kernfs_vfsops = {
kernfs_init,
};
VFS_SET(kernfs_vfsops, kernfs, MOUNT_KERNFS, VFCF_SYNTHETIC);
VFS_SET(kernfs_vfsops, kernfs, VFCF_SYNTHETIC);

View File

@ -36,7 +36,7 @@
* @(#)null_vfsops.c 8.2 (Berkeley) 1/21/94
*
* @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92
* $Id: null_vfsops.c,v 1.26 1998/05/06 05:29:34 msmith Exp $
* $Id: null_vfsops.c,v 1.27 1998/07/30 17:40:45 bde Exp $
*/
/*
@ -422,4 +422,4 @@ static struct vfsops null_vfsops = {
nullfs_init,
};
VFS_SET(null_vfsops, null, MOUNT_NULL, VFCF_LOOPBACK);
VFS_SET(null_vfsops, null, VFCF_LOOPBACK);

View File

@ -35,7 +35,7 @@
*
* @(#)portal_vfsops.c 8.11 (Berkeley) 5/14/95
*
* $Id: portal_vfsops.c,v 1.20 1998/03/01 22:46:20 msmith Exp $
* $Id: portal_vfsops.c,v 1.21 1998/05/06 05:29:35 msmith Exp $
*/
/*
@ -289,4 +289,4 @@ static struct vfsops portal_vfsops = {
portal_init,
};
VFS_SET(portal_vfsops, portal, MOUNT_PORTAL, VFCF_SYNTHETIC);
VFS_SET(portal_vfsops, portal, VFCF_SYNTHETIC);

View File

@ -36,7 +36,7 @@
*
* @(#)procfs_vfsops.c 8.7 (Berkeley) 5/10/95
*
* $Id: procfs_vfsops.c,v 1.24 1998/07/27 01:07:01 alex Exp $
* $Id: procfs_vfsops.c,v 1.25 1998/07/27 22:47:17 alex Exp $
*/
/*
@ -212,4 +212,4 @@ static struct vfsops procfs_vfsops = {
procfs_init,
};
VFS_SET(procfs_vfsops, procfs, MOUNT_PROCFS, VFCF_SYNTHETIC);
VFS_SET(procfs_vfsops, procfs, VFCF_SYNTHETIC);

View File

@ -35,7 +35,7 @@
*
* @(#)umap_vfsops.c 8.8 (Berkeley) 5/14/95
*
* $Id: umap_vfsops.c,v 1.21 1998/03/01 22:46:24 msmith Exp $
* $Id: umap_vfsops.c,v 1.22 1998/05/06 05:29:36 msmith Exp $
*/
/*
@ -428,4 +428,4 @@ static struct vfsops umap_vfsops = {
umapfs_init,
};
VFS_SET(umap_vfsops, umap, MOUNT_UMAP, VFCF_LOOPBACK);
VFS_SET(umap_vfsops, umap, VFCF_LOOPBACK);

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* @(#)union_vfsops.c 8.20 (Berkeley) 5/20/95
* $Id: union_vfsops.c,v 1.28 1998/04/17 22:36:56 des Exp $
* $Id: union_vfsops.c,v 1.29 1998/05/06 05:29:37 msmith Exp $
*/
/*
@ -552,4 +552,4 @@ static struct vfsops union_vfsops = {
union_init,
};
VFS_SET(union_vfsops, union, MOUNT_UNION, VFCF_LOOPBACK);
VFS_SET(union_vfsops, union, VFCF_LOOPBACK);

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_vfsops.c,v 1.34 1998/04/29 12:55:51 dt Exp $ */
/* $Id: msdosfs_vfsops.c,v 1.35 1998/05/06 05:29:38 msmith Exp $ */
/* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */
/*-
@ -1015,4 +1015,4 @@ static struct vfsops msdosfs_vfsops = {
msdosfs_init
};
VFS_SET(msdosfs_vfsops, msdos, MOUNT_MSDOS, 0);
VFS_SET(msdosfs_vfsops, msdos, 0);

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95
* $Id: nfs_vfsops.c,v 1.74 1998/09/05 17:13:28 bde Exp $
* $Id: nfs_vfsops.c,v 1.75 1998/09/07 05:42:15 bde Exp $
*/
#include <sys/param.h>
@ -84,7 +84,7 @@ MALLOC_DEFINE(M_NFSHASH, "NFS hash", "NFS hash tables");
vm_zone_t nfsmount_zone;
struct nfsstats nfsstats;
SYSCTL_NODE(_vfs, MOUNT_NFS, nfs, CTLFLAG_RW, 0, "NFS filesystem");
SYSCTL_NODE(_vfs, OID_AUTO, nfs, CTLFLAG_RW, 0, "NFS filesystem");
SYSCTL_STRUCT(_vfs_nfs, NFS_NFSSTATS, nfsstats, CTLFLAG_RD,
&nfsstats, nfsstats, "");
#ifdef NFS_DEBUG
@ -135,7 +135,7 @@ static struct vfsops nfs_vfsops = {
nfs_uninit,
&sysctl___vfs_nfs
};
VFS_SET(nfs_vfsops, nfs, MOUNT_NFS, VFCF_NETWORK);
VFS_SET(nfs_vfsops, nfs, VFCF_NETWORK);
/*
* This structure must be filled in by a primary bootstrap or bootstrap
@ -288,7 +288,6 @@ nfs_statfs(mp, sbp, p)
goto nfsmout;
}
nfsm_dissect(sfp, struct nfs_statfs *, NFSX_STATFS(v3));
sbp->f_type = MOUNT_NFS;
sbp->f_flags = nmp->nm_flag;
sbp->f_iosize = nfs_iosize(nmp);
if (v3) {
@ -312,6 +311,7 @@ nfs_statfs(mp, sbp, p)
sbp->f_ffree = 0;
}
if (sbp != &mp->mnt_stat) {
sbp->f_type = mp->mnt_vfc->vfc_typenum;
bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN);
bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN);
}

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95
* $Id: nfs_vfsops.c,v 1.74 1998/09/05 17:13:28 bde Exp $
* $Id: nfs_vfsops.c,v 1.75 1998/09/07 05:42:15 bde Exp $
*/
#include <sys/param.h>
@ -84,7 +84,7 @@ MALLOC_DEFINE(M_NFSHASH, "NFS hash", "NFS hash tables");
vm_zone_t nfsmount_zone;
struct nfsstats nfsstats;
SYSCTL_NODE(_vfs, MOUNT_NFS, nfs, CTLFLAG_RW, 0, "NFS filesystem");
SYSCTL_NODE(_vfs, OID_AUTO, nfs, CTLFLAG_RW, 0, "NFS filesystem");
SYSCTL_STRUCT(_vfs_nfs, NFS_NFSSTATS, nfsstats, CTLFLAG_RD,
&nfsstats, nfsstats, "");
#ifdef NFS_DEBUG
@ -135,7 +135,7 @@ static struct vfsops nfs_vfsops = {
nfs_uninit,
&sysctl___vfs_nfs
};
VFS_SET(nfs_vfsops, nfs, MOUNT_NFS, VFCF_NETWORK);
VFS_SET(nfs_vfsops, nfs, VFCF_NETWORK);
/*
* This structure must be filled in by a primary bootstrap or bootstrap
@ -288,7 +288,6 @@ nfs_statfs(mp, sbp, p)
goto nfsmout;
}
nfsm_dissect(sfp, struct nfs_statfs *, NFSX_STATFS(v3));
sbp->f_type = MOUNT_NFS;
sbp->f_flags = nmp->nm_flag;
sbp->f_iosize = nfs_iosize(nmp);
if (v3) {
@ -312,6 +311,7 @@ nfs_statfs(mp, sbp, p)
sbp->f_ffree = 0;
}
if (sbp != &mp->mnt_stat) {
sbp->f_type = mp->mnt_vfc->vfc_typenum;
bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN);
bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN);
}

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)mount.h 8.21 (Berkeley) 5/20/95
* $Id: mount.h,v 1.65 1998/09/02 17:25:51 bde Exp $
* $Id: mount.h,v 1.66 1998/09/05 15:17:34 bde Exp $
*/
#ifndef _SYS_MOUNT_H_
@ -82,55 +82,6 @@ struct statfs {
char f_mntfromname[MNAMELEN];/* mounted filesystem */
};
/*
* File system types (for backwards compat with 4.4Lite.)
*/
#define MOUNT_NONE 0
#define MOUNT_UFS 1 /* Fast Filesystem */
#define MOUNT_NFS 2 /* Sun-compatible Network Filesystem */
#define MOUNT_MFS 3 /* Memory-based Filesystem */
#define MOUNT_MSDOS 4 /* MS/DOS Filesystem */
#define MOUNT_LFS 5 /* Log-based Filesystem */
#define MOUNT_LOFS 6 /* Loopback Filesystem */
#define MOUNT_FDESC 7 /* File Descriptor Filesystem */
#define MOUNT_PORTAL 8 /* Portal Filesystem */
#define MOUNT_NULL 9 /* Minimal Filesystem Layer */
#define MOUNT_UMAP 10 /* User/Group Identifier Remapping Filesystem */
#define MOUNT_KERNFS 11 /* Kernel Information Filesystem */
#define MOUNT_PROCFS 12 /* /proc Filesystem */
#define MOUNT_AFS 13 /* Andrew Filesystem */
#define MOUNT_CD9660 14 /* ISO9660 (aka CDROM) Filesystem */
#define MOUNT_UNION 15 /* Union (translucent) Filesystem */
#define MOUNT_DEVFS 16 /* existing device Filesystem */
#define MOUNT_EXT2FS 17 /* Linux EXT2FS */
#define MOUNT_TFS 18 /* Netcon Novell filesystem */
#define MOUNT_CFS 19 /* Coda filesystem */
#define MOUNT_MAXTYPE 19
#define INITMOUNTNAMES { \
"none", /* 0 MOUNT_NONE */ \
"ufs", /* 1 MOUNT_UFS */ \
"nfs", /* 2 MOUNT_NFS */ \
"mfs", /* 3 MOUNT_MFS */ \
"msdos", /* 4 MOUNT_MSDOS */ \
"lfs", /* 5 MOUNT_LFS */ \
"lofs", /* 6 MOUNT_LOFS */ \
"fdesc", /* 7 MOUNT_FDESC */ \
"portal", /* 8 MOUNT_PORTAL */ \
"null", /* 9 MOUNT_NULL */ \
"umap", /* 10 MOUNT_UMAP */ \
"kernfs", /* 11 MOUNT_KERNFS */ \
"procfs", /* 12 MOUNT_PROCFS */ \
"afs", /* 13 MOUNT_AFS */ \
"cd9660", /* 14 MOUNT_CD9660 */ \
"union", /* 15 MOUNT_UNION */ \
"devfs", /* 16 MOUNT_DEVFS */ \
"ext2fs", /* 17 MOUNT_EXT2FS */ \
"tfs", /* 18 MOUNT_TFS */ \
"cfs", /* 19 MOUNT_CFS */ \
0, /* 20 MOUNT_SPARE */ \
}
/*
* Structure per mounted file system. Each mounted file system has an
* array of operations and an instance record. The file systems are
@ -381,11 +332,11 @@ struct vfsops {
#include <sys/sysent.h>
#include <sys/lkm.h>
#define VFS_SET(vfsops, fsname, index, flags) \
#define VFS_SET(vfsops, fsname, flags) \
static struct vfsconf _fs_vfsconf = { \
&vfsops, \
#fsname, \
index, \
-1, \
0, \
flags, \
}; \
@ -399,11 +350,11 @@ struct vfsops {
lkmtp, cmd, ver, lkm_nullcmd, lkm_nullcmd, lkm_nullcmd); }
#else
#define VFS_SET(vfsops, fsname, index, flags) \
#define VFS_SET(vfsops, fsname, flags) \
static struct vfsconf _fs_vfsconf = { \
&vfsops, \
#fsname, \
index, \
-1, \
0, \
flags | VFCF_STATIC, \
}; \

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95
* $Id: ffs_vfsops.c,v 1.84 1998/07/08 23:52:27 julian Exp $
* $Id: ffs_vfsops.c,v 1.85 1998/08/17 19:09:36 bde Exp $
*/
#include "opt_devfs.h" /* for SLICE */
@ -87,7 +87,7 @@ static struct vfsops ufs_vfsops = {
ffs_init,
};
VFS_SET(ufs_vfsops, ufs, MOUNT_UFS, 0);
VFS_SET(ufs_vfsops, ufs, 0);
/*
* ffs_mount

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)mfs_vfsops.c 8.11 (Berkeley) 6/19/95
* $Id: mfs_vfsops.c,v 1.42 1998/05/06 05:29:41 msmith Exp $
* $Id: mfs_vfsops.c,v 1.43 1998/05/11 19:27:18 julian Exp $
*/
@ -102,7 +102,7 @@ static struct vfsops mfs_vfsops = {
mfs_init,
};
VFS_SET(mfs_vfsops, mfs, MOUNT_MFS, 0);
VFS_SET(mfs_vfsops, mfs, 0);
#ifdef SLICE
extern struct vnode *root_device_vnode;