diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-05-31 17:34:56 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-05-31 17:34:56 +0000 |
commit | bc8362e4ef1c185f7c1d9aec69d91f269c97d4e2 (patch) | |
tree | 9194d1773b772347d76766611948ee38e1002058 /sys/miscfs | |
parent | 7a1b6dcd69cb5defd76dca41d6f8252a3140fb91 (diff) |
New struct statfs with mount options. NOTE: this replaces statfs(2),
fstatfs(2), and getfsstat(2) so you will need to build a new kernel
before doing a "make build" or you will get "unimplemented syscall" errors.
The new struct statfs has the following featuires:
o Has a u_int32_t flags field--now softdep can have a real flag.
o Uses u_int32_t instead of longs (nicer on the alpha). Note: the man
page used to lie about setting invalid/unused fields to -1. SunOS does
that but our code never has.
o Gets rid of f_type completely. It hasn't been used since NetBSD 0.9
and having it there but always 0 is confusing. It is conceivable
that this may cause some old code to not compile but that is better
than silently breaking.
o Adds a mount_info union that contains the FSTYPE_args struct. This
means that "mount" can now tell you all the options a filesystem was
mounted with. This is especially nice for NFS.
Other changes:
o The linux statfs emulation didn't convert between BSD fs names
and linux f_type numbers. Now it does, since the BSD f_type
number is useless to linux apps (and has been removed anyway)
o FreeBSD's struct statfs is different from our (both old and new)
and thus needs conversion. Previously, the OpenBSD syscalls
were used without any real translation.
o mount(8) will now show extra info when invoked with no arguments.
However, to see *everything* you need to use the -v (verbose) flag.
Diffstat (limited to 'sys/miscfs')
-rw-r--r-- | sys/miscfs/fdesc/fdesc_vfsops.c | 8 | ||||
-rw-r--r-- | sys/miscfs/kernfs/kernfs_vfsops.c | 6 | ||||
-rw-r--r-- | sys/miscfs/nullfs/null_vfsops.c | 3 | ||||
-rw-r--r-- | sys/miscfs/portal/portal_vfsops.c | 8 | ||||
-rw-r--r-- | sys/miscfs/procfs/procfs_vfsops.c | 7 | ||||
-rw-r--r-- | sys/miscfs/umapfs/umap_vfsops.c | 3 | ||||
-rw-r--r-- | sys/miscfs/union/union_vfsops.c | 5 |
7 files changed, 7 insertions, 33 deletions
diff --git a/sys/miscfs/fdesc/fdesc_vfsops.c b/sys/miscfs/fdesc/fdesc_vfsops.c index 358ad6892ee..7a171afddee 100644 --- a/sys/miscfs/fdesc/fdesc_vfsops.c +++ b/sys/miscfs/fdesc/fdesc_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fdesc_vfsops.c,v 1.6 1998/02/08 22:41:37 tholo Exp $ */ +/* $OpenBSD: fdesc_vfsops.c,v 1.7 1999/05/31 17:34:49 millert Exp $ */ /* $NetBSD: fdesc_vfsops.c,v 1.21 1996/02/09 22:40:07 christos Exp $ */ /* @@ -213,11 +213,6 @@ fdesc_statfs(mp, sbp, p) if (fdp->fd_nfiles < lim) freefd += (lim - fdp->fd_nfiles); -#ifdef COMPAT_09 - sbp->f_type = 6; -#else - sbp->f_type = 0; -#endif sbp->f_bsize = DEV_BSIZE; sbp->f_iosize = DEV_BSIZE; sbp->f_blocks = 2; /* 1K to keep df happy */ @@ -226,7 +221,6 @@ fdesc_statfs(mp, sbp, p) sbp->f_files = lim + 1; /* Allow for "." */ sbp->f_ffree = freefd; /* See comments above */ if (sbp != &mp->mnt_stat) { - sbp->f_type = mp->mnt_vfc->vfc_typenum; bcopy(&mp->mnt_stat.f_fsid, &sbp->f_fsid, sizeof(sbp->f_fsid)); bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN); bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN); diff --git a/sys/miscfs/kernfs/kernfs_vfsops.c b/sys/miscfs/kernfs/kernfs_vfsops.c index 7a74578173f..87d26d9813f 100644 --- a/sys/miscfs/kernfs/kernfs_vfsops.c +++ b/sys/miscfs/kernfs/kernfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kernfs_vfsops.c,v 1.11 1999/02/26 03:44:16 art Exp $ */ +/* $OpenBSD: kernfs_vfsops.c,v 1.12 1999/05/31 17:34:49 millert Exp $ */ /* $NetBSD: kernfs_vfsops.c,v 1.26 1996/04/22 01:42:27 christos Exp $ */ /* @@ -250,9 +250,6 @@ kernfs_statfs(mp, sbp, p) printf("kernfs_statfs(mp = %p)\n", mp); #endif -#ifdef COMPAT_09 - sbp->f_type = 7; -#endif sbp->f_flags = 0; #if defined(UVM) sbp->f_bsize = uvmexp.pagesize; @@ -268,7 +265,6 @@ kernfs_statfs(mp, sbp, p) sbp->f_files = desiredvnodes; sbp->f_ffree = desiredvnodes - numvnodes; if (sbp != &mp->mnt_stat) { - sbp->f_type = mp->mnt_vfc->vfc_typenum; bcopy(&mp->mnt_stat.f_fsid, &sbp->f_fsid, sizeof(sbp->f_fsid)); bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN); bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN); diff --git a/sys/miscfs/nullfs/null_vfsops.c b/sys/miscfs/nullfs/null_vfsops.c index 5e641e3ad43..f59d83c1d37 100644 --- a/sys/miscfs/nullfs/null_vfsops.c +++ b/sys/miscfs/nullfs/null_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: null_vfsops.c,v 1.9 1998/08/06 23:38:39 csapuntz Exp $ */ +/* $OpenBSD: null_vfsops.c,v 1.10 1999/05/31 17:34:49 millert Exp $ */ /* $NetBSD: null_vfsops.c,v 1.11 1996/05/10 22:50:56 jtk Exp $ */ /* @@ -309,7 +309,6 @@ nullfs_statfs(mp, sbp, p) return (error); /* now copy across the "interesting" information and fake the rest */ - sbp->f_type = mstat.f_type; sbp->f_flags = mstat.f_flags; sbp->f_bsize = mstat.f_bsize; sbp->f_iosize = mstat.f_iosize; diff --git a/sys/miscfs/portal/portal_vfsops.c b/sys/miscfs/portal/portal_vfsops.c index 5e6cb876637..b2eb51f50dd 100644 --- a/sys/miscfs/portal/portal_vfsops.c +++ b/sys/miscfs/portal/portal_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: portal_vfsops.c,v 1.6 1998/02/08 22:41:39 tholo Exp $ */ +/* $OpenBSD: portal_vfsops.c,v 1.7 1999/05/31 17:34:50 millert Exp $ */ /* $NetBSD: portal_vfsops.c,v 1.14 1996/02/09 22:40:41 christos Exp $ */ /* @@ -226,11 +226,6 @@ portal_statfs(mp, sbp, p) struct proc *p; { -#ifdef COMPAT_09 - sbp->f_type = 12; -#else - sbp->f_type = 0; -#endif sbp->f_bsize = DEV_BSIZE; sbp->f_iosize = DEV_BSIZE; sbp->f_blocks = 2; /* 1K to keep df happy */ @@ -239,7 +234,6 @@ portal_statfs(mp, sbp, p) sbp->f_files = 1; /* Allow for "." */ sbp->f_ffree = 0; /* See comments above */ if (sbp != &mp->mnt_stat) { - sbp->f_type = mp->mnt_vfc->vfc_typenum; bcopy(&mp->mnt_stat.f_fsid, &sbp->f_fsid, sizeof(sbp->f_fsid)); bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN); bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN); diff --git a/sys/miscfs/procfs/procfs_vfsops.c b/sys/miscfs/procfs/procfs_vfsops.c index 8ed90970b04..618007642f6 100644 --- a/sys/miscfs/procfs/procfs_vfsops.c +++ b/sys/miscfs/procfs/procfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_vfsops.c,v 1.9 1999/02/26 03:47:46 art Exp $ */ +/* $OpenBSD: procfs_vfsops.c,v 1.10 1999/05/31 17:34:50 millert Exp $ */ /* $NetBSD: procfs_vfsops.c,v 1.25 1996/02/09 22:40:53 christos Exp $ */ /* @@ -163,11 +163,6 @@ procfs_statfs(mp, sbp, p) #else vmtotal(&vmtotals); #endif -#ifdef COMPAT_09 - sbp->f_type = 10; -#else - sbp->f_type = 0; -#endif sbp->f_bsize = PAGE_SIZE; sbp->f_iosize = PAGE_SIZE; sbp->f_blocks = vmtotals.t_vm; diff --git a/sys/miscfs/umapfs/umap_vfsops.c b/sys/miscfs/umapfs/umap_vfsops.c index 992fd5a4d35..d2409287f88 100644 --- a/sys/miscfs/umapfs/umap_vfsops.c +++ b/sys/miscfs/umapfs/umap_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umap_vfsops.c,v 1.13 1999/03/18 08:34:18 art Exp $ */ +/* $OpenBSD: umap_vfsops.c,v 1.14 1999/05/31 17:34:50 millert Exp $ */ /* $NetBSD: umap_vfsops.c,v 1.9 1996/02/09 22:41:05 christos Exp $ */ /* @@ -351,7 +351,6 @@ umapfs_statfs(mp, sbp, p) return (error); /* now copy across the "interesting" information and fake the rest */ - sbp->f_type = mstat.f_type; sbp->f_flags = mstat.f_flags; sbp->f_bsize = mstat.f_bsize; sbp->f_iosize = mstat.f_iosize; diff --git a/sys/miscfs/union/union_vfsops.c b/sys/miscfs/union/union_vfsops.c index 8032397c2d0..3b0743343d8 100644 --- a/sys/miscfs/union/union_vfsops.c +++ b/sys/miscfs/union/union_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: union_vfsops.c,v 1.8 1998/02/08 22:41:42 tholo Exp $ */ +/* $OpenBSD: union_vfsops.c,v 1.9 1999/05/31 17:34:50 millert Exp $ */ /* $NetBSD: union_vfsops.c,v 1.10 1995/06/18 14:47:47 cgd Exp $ */ /* @@ -431,7 +431,6 @@ union_statfs(mp, sbp, p) /* now copy across the "interesting" information and fake the rest */ #if 0 - sbp->f_type = mstat.f_type; sbp->f_flags = mstat.f_flags; sbp->f_bsize = mstat.f_bsize; sbp->f_iosize = mstat.f_iosize; @@ -447,7 +446,6 @@ union_statfs(mp, sbp, p) if (error) return (error); - sbp->f_type = 0; sbp->f_flags = mstat.f_flags; sbp->f_bsize = mstat.f_bsize; sbp->f_iosize = mstat.f_iosize; @@ -470,7 +468,6 @@ union_statfs(mp, sbp, p) sbp->f_ffree += mstat.f_ffree; if (sbp != &mp->mnt_stat) { - sbp->f_type = mp->mnt_vfc->vfc_typenum; bcopy(&mp->mnt_stat.f_fsid, &sbp->f_fsid, sizeof(sbp->f_fsid)); bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN); bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN); |