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/isofs/cd9660 | |
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/isofs/cd9660')
-rw-r--r-- | sys/isofs/cd9660/cd9660_vfsops.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/isofs/cd9660/cd9660_vfsops.c b/sys/isofs/cd9660/cd9660_vfsops.c index c647aa70370..a8a00c2ffd5 100644 --- a/sys/isofs/cd9660/cd9660_vfsops.c +++ b/sys/isofs/cd9660/cd9660_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vfsops.c,v 1.15 1998/09/06 20:31:31 millert Exp $ */ +/* $OpenBSD: cd9660_vfsops.c,v 1.16 1999/05/31 17:34:46 millert Exp $ */ /* $NetBSD: cd9660_vfsops.c,v 1.26 1997/06/13 15:38:58 pk Exp $ */ /*- @@ -206,6 +206,7 @@ cd9660_mount(mp, path, data, ndp, p) (void)copyinstr(args.fspec, mp->mnt_stat.f_mntfromname, MNAMELEN - 1, &size); bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); + bcopy(&args, &mp->mnt_stat.mount_info.iso_args, sizeof(args)); (void)cd9660_statfs(mp, &mp->mnt_stat, p); return (0); } @@ -564,11 +565,6 @@ cd9660_statfs(mp, sbp, p) isomp = VFSTOISOFS(mp); -#ifdef COMPAT_09 - sbp->f_type = 5; -#else - sbp->f_type = 0; -#endif sbp->f_bsize = isomp->logical_block_size; sbp->f_iosize = sbp->f_bsize; /* XXX */ sbp->f_blocks = isomp->volume_space_size; @@ -580,6 +576,8 @@ cd9660_statfs(mp, sbp, p) bcopy(mp->mnt_stat.f_mntonname, sbp->f_mntonname, MNAMELEN); bcopy(mp->mnt_stat.f_mntfromname, sbp->f_mntfromname, MNAMELEN); + bcopy(&mp->mnt_stat.mount_info.iso_args, + &sbp->mount_info.iso_args, sizeof(struct iso_args)); } /* Use the first spare for flags: */ sbp->f_spare[0] = isomp->im_flags; |