diff options
author | 1999-05-31 17:34:39 +0000 | |
---|---|---|
committer | 1999-05-31 17:34:39 +0000 | |
commit | ef921adb8d7e32b181c8c0cee764ec21824f98e1 (patch) | |
tree | 92c8c81d878d3dd317c727134865748e6b031e98 /lib/libc/sys/statfs.2 | |
parent | Use connection-oriented transport (ie: TCP) when possible. This makes (diff) | |
download | wireguard-openbsd-ef921adb8d7e32b181c8c0cee764ec21824f98e1.tar.xz wireguard-openbsd-ef921adb8d7e32b181c8c0cee764ec21824f98e1.zip |
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 'lib/libc/sys/statfs.2')
-rw-r--r-- | lib/libc/sys/statfs.2 | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/lib/libc/sys/statfs.2 b/lib/libc/sys/statfs.2 index c48361f1cbe..3b80f94e48b 100644 --- a/lib/libc/sys/statfs.2 +++ b/lib/libc/sys/statfs.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: statfs.2,v 1.9 1999/04/18 17:26:52 espie Exp $ +.\" $OpenBSD: statfs.2,v 1.10 1999/05/31 17:34:41 millert Exp $ .\" $NetBSD: statfs.2,v 1.10 1995/06/29 11:40:48 cgd Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 @@ -59,31 +59,30 @@ structure defined as follows: .Bd -literal typedef struct { int32_t val[2]; } fsid_t; -#define MFSNAMELEN 16 /* length of fs type name, including nul */ +#define MFSNAMELEN 16 /* length of fs type name, including NUL */ #define MNAMELEN 32 /* length of buffer for returned name */ struct statfs { - short f_type; /* type of file system (unused; zero) */ - short f_flags; /* copy of mount flags */ - long f_bsize; /* fundamental file system block size */ - long f_iosize; /* optimal transfer block size */ - long f_blocks; /* total data blocks in file system */ - long f_bfree; /* free blocks in fs */ - long f_bavail; /* free blocks avail to non-superuser */ - long f_files; /* total file nodes in file system */ - long f_ffree; /* free file nodes in fs */ - fsid_t f_fsid; /* file system id (super-user only) */ - uid_t f_owner; /* user that mounted the file system */ - long f_syncwrites; /* count of sync writes since mount */ - long f_asyncwrites; /* count of async writes since mount */ - long f_spare[2]; /* spare for later */ - char f_fstypename[MFSNAMELEN]; /* fs type name */ - char f_mntonname[MNAMELEN]; /* directory on which mounted */ - char f_mntfromname[MNAMELEN]; /* mounted file system */ + u_int32_t f_flags; /* copy of mount flags */ + u_int32_t f_bsize; /* fundamental file system block size */ + u_int32_t f_iosize; /* optimal transfer block size */ + u_int32_t f_blocks; /* total data blocks in file system */ + u_int32_t f_bfree; /* free blocks in fs */ + u_int32_t f_bavail; /* free blocks avail to non-superuser */ + u_int32_t f_files; /* total file nodes in file system */ + u_int32_t f_ffree; /* free file nodes in fs */ + fsid_t f_fsid; /* file system id */ + uid_t f_owner; /* user that mounted the file system */ + u_int32_t f_syncwrites; /* count of sync writes since mount */ + u_int32_t f_asyncwrites; /* count of async writes since mount */ + u_int32_t f_spare[4]; /* spare for later */ + char f_fstypename[MFSNAMELEN]; /* fs type name */ + char f_mntonname[MNAMELEN]; /* directory on which mounted */ + char f_mntfromname[MNAMELEN]; /* mounted file system */ + union mount_info mount_info; /* per-filesystem mount options */ }; .Ed .Pp -Fields that are undefined for a particular file system are set to -1. .Fn fstatfs returns the same information about an open file referenced by descriptor .Fa fd . |