BSD 4_4_Lite2 release
[unix-history] / usr / src / lib / libc / sys / statfs.2
index a7a1da2..6db63c6 100644 (file)
@@ -29,9 +29,9 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.\"    @(#)statfs.2    8.3 (Berkeley) 2/11/94
+.\"    @(#)statfs.2    8.5 (Berkeley) 5/24/95
 .\"
 .\"
-.Dd February 11, 1994
+.Dd May 24, 1995
 .Dt STATFS 2
 .Os
 .Sh NAME
 .Dt STATFS 2
 .Os
 .Sh NAME
@@ -56,42 +56,59 @@ structure defined as follows:
 .Bd -literal
 typedef quad fsid_t;
 
 .Bd -literal
 typedef quad fsid_t;
 
-#define MNAMELEN 90    /* length of buffer for returned name */
+#define MFSNAMELEN     16      /* length of fs type name, including null */
+#define        MNAMELEN        90      /* length of buffer for returned name */
 
 struct statfs {
 
 struct statfs {
-short  f_type;           /* type of filesystem (see below) */
-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 */
-long   f_spare[9];       /* spare for later */
-char   f_mntonname[MNAMELEN];    /* mount point */
-char   f_mntfromname[MNAMELEN];  /* mounted filesystem */
+       short   f_type;                 /* filesystem type number */
+       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 */
+       uid_t   f_owner;                /* user that mounted the filesystem */
+       long    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 filesystem */
 };
 };
-/*
-* File system types.
-*/
-#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      /* Uid/Gid 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 */
 .Ed
 .Ed
+The flags that may be returned include:
+.Bl -tag -width MNT_ASYNCHRONOUS
+.It Dv MNT_RDONLY
+The filesystem is mounted read-only;
+Even the super-user may not write on it.
+.It Dv MNT_NOEXEC
+Files may not be executed from the filesystem.
+.It Dv MNT_NOSUID
+Setuid and setgid bits on files are not honored when they are executed.
+.It Dv MNT_NODEV
+Special files in the filesystem may not be opened.
+.It Dv MNT_SYNCHRONOUS
+All I/O to the filesystem is done synchronously.
+.It Dv MNT_ASYNCHRONOUS
+No filesystem I/O is done synchronously.
+.It Dv MNT_LOCAL
+The filesystem resides locally.
+.It Dv MNT_QUOTA
+The filesystem has quotas enabled on it.
+.It Dv MNT_ROOTFS
+Identifies the root filesystem.
+.It Dv MNT_EXRDONLY
+The filesystem is exported read-only.
+.It Dv MNT_EXPORTED
+The filesystem is exported for both reading and writing.
+.It Dv MNT_DEFEXPORTED
+The filesystem is exported for both reading and writing to any Internet host.
+.It Dv MNT_EXPORTANON
+The filesystem maps all remote accesses to the anonymous user.
+.It Dv MNT_EXKERB
+The filesystem is exported with Kerberos uid mapping.
+.El
 .Pp
 Fields that are undefined for a particular file system are set to -1.
 .Fn Fstatfs
 .Pp
 Fields that are undefined for a particular file system are set to -1.
 .Fn Fstatfs