BSD 4_4 release
[unix-history] / usr / src / lib / libc / sys / mount.2
index d0a5215..eb6dc14 100644 (file)
@@ -1,11 +1,37 @@
-.\" Copyright (c) 1980, 1989 The Regents of the University of California.
-.\" All rights reserved.
+.\" Copyright (c) 1980, 1989, 1993
+.\"    The Regents of the University of California.  All rights reserved.
 .\"
 .\"
-.\" %sccs.include.redist.man%
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"    This product includes software developed by the University of
+.\"    California, Berkeley and its contributors.
+.\" 4. Neither the name of the University nor the names of its contributors
+.\"    may be used to endorse or promote products derived from this software
+.\"    without specific prior written permission.
 .\"
 .\"
-.\"     @(#)mount.2    8.1 (Berkeley) %G%
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
 .\"
 .\"
-.Dd 
+.\"     @(#)mount.2    8.1 (Berkeley) 7/11/93
+.\"
+.Dd July 11, 1993
 .Dt MOUNT 2
 .Os BSD 4
 .Sh NAME
 .Dt MOUNT 2
 .Os BSD 4
 .Sh NAME
@@ -13,6 +39,7 @@
 .Nm unmount
 .Nd mount or dismount a filesystem
 .Sh SYNOPSIS
 .Nm unmount
 .Nd mount or dismount a filesystem
 .Sh SYNOPSIS
+.Fd #include <sys/param.h>
 .Fd #include <sys/mount.h>
 .Ft int
 .Fn mount "int type" "const char *dir" "int flags" "caddr_t data"
 .Fd #include <sys/mount.h>
 .Ft int
 .Fn mount "int type" "const char *dir" "int flags" "caddr_t data"
@@ -48,39 +75,39 @@ The following
 .Ar flags
 may be specified to
 suppress default semantics which affect filesystem access.
 .Ar flags
 may be specified to
 suppress default semantics which affect filesystem access.
-.Bl -tag -width M_SYNCHRONOUS
-.It Dv M_RDONLY
-The file system should be treated as read-only;
+.Bl -tag -width MNT_SYNCHRONOUS
+.It Dv MNT_RDONLY
+The filesystem should be treated as read-only;
 Even the super-user may not write on it.
 Even the super-user may not write on it.
-.It Dv M_NOEXEC
-Do not allow files to be executed from the file system.
-.It Dv M_NOSUID
+.It Dv MNT_NOEXEC
+Do not allow files to be executed from the filesystem.
+.It Dv MNT_NOSUID
 Do not honor setuid or setgid bits on files when executing them.
 Do not honor setuid or setgid bits on files when executing them.
-.It Dv M_NODEV
-Do not interpret special files on the file system.
-.It Dv M_SYNCHRONOUS
-All I/O to the file system should be done synchronously.
+.It Dv MNT_NODEV
+Do not interpret special files on the filesystem.
+.It Dv MNT_SYNCHRONOUS
+All I/O to the filesystem should be done synchronously.
 .El
 .Pp
 The flag
 .El
 .Pp
 The flag
-.Dv M_UPDATE
+.Dv MNT_UPDATE
 indicates that the mount command is being applied 
 indicates that the mount command is being applied 
-to an already mounted file system.
+to an already mounted filesystem.
 This allows the mount flags to be changed without requiring
 This allows the mount flags to be changed without requiring
-that the file system be unmounted and remounted.
-Some file systems may not allow all flags to be changed.
+that the filesystem be unmounted and remounted.
+Some filesystems may not allow all flags to be changed.
 For example,
 For example,
-most file systems will not allow a change from read-write to read-only.
+most filesystems will not allow a change from read-write to read-only.
 .Pp
 The
 .Fa type
 .Pp
 The
 .Fa type
-argument defines the type of the file system.
-The types of file systems known to the system are defined in
+argument defines the type of the filesystem.
+The types of filesystems known to the system are defined in
 .Aq Pa sys/mount.h .
 .Fa Data
 is a pointer to a structure that contains the type
 specific arguments to mount.
 .Aq Pa sys/mount.h .
 .Fa Data
 is a pointer to a structure that contains the type
 specific arguments to mount.
-The currently supported types of file systems and
+The currently supported types of filesystems and
 their type specific data are:
 .Pp
 .Dv MOUNT_UFS
 their type specific data are:
 .Pp
 .Dv MOUNT_UFS
@@ -110,8 +137,8 @@ struct nfs_args {
 .Bd -literal -offset indent -compact
 struct mfs_args {
       char     *name;  /* name of backing process */
 .Bd -literal -offset indent -compact
 struct mfs_args {
       char     *name;  /* name of backing process */
-      caddr_t  base;   /* base address of the file system */
-      u_long   size;   /* size of the file system */
+      caddr_t  base;   /* base address of the filesystem */
+      u_long   size;   /* size of the filesystem */
 };
 .Ed
 .Pp
 };
 .Ed
 .Pp
@@ -123,17 +150,13 @@ mount point
 .Pp
 The
 .Fa flags
 .Pp
 The
 .Fa flags
-argument may have one of the following values:
-.Bl -tag -width  M_SYNCHRONOUS
-.It Dv MNT_NOFORCE
-The unmount should fail if any files are active on the file system.
-.It Dv MNT_FORCE
-The file system should be forcibly unmounted even if files are
+argument may specify
+.Dv MNT_FORCE
+to specify that the filesystem should be forcibly unmounted even if files are
 still active.
 Active special devices continue to work,
 but any further accesses to any other active files result in errors
 still active.
 Active special devices continue to work,
 but any further accesses to any other active files result in errors
-even if the file system is later remounted.
-.El
+even if the filesystem is later remounted.
 .Sh RETURN VALUES
 The
 .Fn mount
 .Sh RETURN VALUES
 The
 .Fn mount
@@ -181,7 +204,7 @@ points outside the process's allocated address space.
 .Pp
 The following errors can occur for a
 .Em ufs
 .Pp
 The following errors can occur for a
 .Em ufs
-file system mount:
+filesystem mount:
 .Bl -tag -width [ENOTBLK]
 .It Bq Er ENODEV
 A component of ufs_args
 .Bl -tag -width [ENOTBLK]
 .It Bq Er ENODEV
 A component of ufs_args
@@ -201,11 +224,11 @@ is already mounted.
 .It Bq Er EMFILE
 No space remains in the mount table.
 .It Bq Er EINVAL
 .It Bq Er EMFILE
 No space remains in the mount table.
 .It Bq Er EINVAL
-The super block for the file system had a bad magic
+The super block for the filesystem had a bad magic
 number or an out of range block size.
 .It Bq Er ENOMEM
 Not enough memory was available to read the cylinder
 number or an out of range block size.
 .It Bq Er ENOMEM
 Not enough memory was available to read the cylinder
-group information for the file system.
+group information for the filesystem.
 .It Bq Er EIO
 An I/O error occurred while reading the super block or
 cylinder group information.
 .It Bq Er EIO
 An I/O error occurred while reading the super block or
 cylinder group information.
@@ -216,7 +239,7 @@ points outside the process's allocated address space.
 .Pp
 The following errors can occur for a
 .Em nfs
 .Pp
 The following errors can occur for a
 .Em nfs
-file system mount:
+filesystem mount:
 .Bl -tag -width [ENOTBLK]
 .It Bq Er ETIMEDOUT
 .Em Nfs
 .Bl -tag -width [ENOTBLK]
 .It Bq Er ETIMEDOUT
 .Em Nfs
@@ -228,16 +251,16 @@ points outside the process's allocated address space.
 .Pp
 The following errors can occur for a
 .Em mfs
 .Pp
 The following errors can occur for a
 .Em mfs
-file system mount:
+filesystem mount:
 .Bl -tag -width [ENOTBLK]
 .It Bq Er EMFILE
 No space remains in the mount table.
 .It Bq Er EINVAL
 .Bl -tag -width [ENOTBLK]
 .It Bq Er EMFILE
 No space remains in the mount table.
 .It Bq Er EINVAL
-The super block for the file system had a bad magic
+The super block for the filesystem had a bad magic
 number or an out of range block size.
 .It Bq Er ENOMEM
 Not enough memory was available to read the cylinder
 number or an out of range block size.
 .It Bq Er ENOMEM
 Not enough memory was available to read the cylinder
-group information for the file system.
+group information for the filesystem.
 .It Bq Er EIO
 An paging error occurred while reading the super block or
 cylinder group information.
 .It Bq Er EIO
 An paging error occurred while reading the super block or
 cylinder group information.
@@ -264,9 +287,9 @@ Too many symbolic links were encountered in translating the pathname.
 The requested directory is not in the mount table.
 .It Bq Er EBUSY
 A process is holding a reference to a file located
 The requested directory is not in the mount table.
 .It Bq Er EBUSY
 A process is holding a reference to a file located
-on the file system.
+on the filesystem.
 .It Bq Er EIO
 .It Bq Er EIO
-An I/O error occurred while writing cached file system information.
+An I/O error occurred while writing cached filesystem information.
 .It Bq Er EFAULT
 .Fa Dir
 points outside the process's allocated address space.
 .It Bq Er EFAULT
 .Fa Dir
 points outside the process's allocated address space.