From 911525d1e9f5448338aa472b7788fd6476872ffb Mon Sep 17 00:00:00 2001 From: millert Date: Sun, 9 Mar 1997 19:41:16 +0000 Subject: [PATCH] Mention MNT_NOATIME and pull in some changes from the lite2 version. --- lib/libc/sys/mount.2 | 97 ++++++++++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 45 deletions(-) diff --git a/lib/libc/sys/mount.2 b/lib/libc/sys/mount.2 index 048f8301322..7d6bac64236 100644 --- a/lib/libc/sys/mount.2 +++ b/lib/libc/sys/mount.2 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mount.2,v 1.5 1996/03/19 23:15:17 niklas Exp $ +.\" $OpenBSD: mount.2,v 1.6 1997/03/09 19:41:16 millert Exp $ .\" $NetBSD: mount.2,v 1.12 1996/02/29 23:47:48 jtc Exp $ .\" .\" Copyright (c) 1980, 1989, 1993 @@ -40,7 +40,7 @@ .Sh NAME .Nm mount , .Nm unmount -.Nd mount or dismount a file system +.Nd mount or dismount a filesystem .Sh SYNOPSIS .Fd #include .Fd #include @@ -52,12 +52,12 @@ The .Fn mount function grafts -a file system object onto the system file tree +a filesystem object onto the system file tree at the point .Ar dir . The argument .Ar data -describes the file system object to be mounted. +describes the filesystem object to be mounted. The argument .Ar type tells the kernel how to interpret @@ -65,54 +65,57 @@ tells the kernel how to interpret (See .Ar type below). -The contents of the file system +The contents of the filesystem become available through the new mount point .Ar dir . Any files in .Ar dir at the time of a successful mount are swept under the carpet so to speak, and -are unavailable until the file system is unmounted. +are unavailable until the filesystem is unmounted. .Pp The following .Ar flags may be specified to -suppress default semantics which affect file system access. +suppress default semantics which affect filesystem access. .Bl -tag -width MNT_SYNCHRONOUS .It Dv MNT_RDONLY -The file system should be treated as read-only; +The filesystem should be treated as read-only; Even the super-user may not write on it. +.It Dv MNT_NOATIME +Do not update the access time on files in the filesystem unless +the modification or status change times are also being updated. .It Dv MNT_NOEXEC -Do not allow files to be executed from the file system. +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. .It Dv MNT_NODEV -Do not interpret special files on the file system. +Do not interpret special files on the filesystem. .It Dv MNT_UNION Union with underlying filesystem instead of obscuring it. .It Dv MNT_SYNCHRONOUS -All I/O to the file system should be done synchronously. +All I/O to the filesystem should be done synchronously. .El .Pp The flag .Dv MNT_UPDATE -indicates that the mount command is being applied -to an already mounted file system. +indicates that the mount command is being applied +to an already mounted filesystem. 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, -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 -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. -The currently supported types of file systems and +The currently supported types of filesystems and their type specific data are: .Pp .Dv MOUNT_FFS @@ -152,14 +155,14 @@ struct nfs_args { struct mfs_args { char *fspec; /* name to export for statfs */ struct export_args export; /* if we can export an MFS */ - caddr_t base; /* base of file system in mem */ - u_long size; /* size of file system */ + caddr_t base; /* base of filesystem in mem */ + u_long size; /* size of filesystem */ }; .Ed .Pp The .Fn umount -function call disassociates the file system from the specified +function call disassociates the filesystem from the specified mount point .Fa dir . .Pp @@ -167,11 +170,11 @@ The .Fa flags argument may specify .Dv MNT_FORCE -to specify that the file system should be forcibly unmounted even if files are +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 -even if the file system is later remounted. +even if the filesystem is later remounted. .Sh RETURN VALUES The .Fn mount @@ -188,13 +191,13 @@ is set to indicate the error. .Sh ERRORS .Fn Mount will fail when one of the following occurs: -.Bl -tag -width Er +.Bl -tag -width [ENAMETOOLONG] .It Bq Er EPERM The caller is not the super-user. .It Bq Er ENAMETOOLONG -A component of a pathname exceeded +A component of a pathname exceeded .Dv {NAME_MAX} -characters, or an entire path name exceeded +characters, or an entire path name exceeded .Dv {PATH_MAX} characters. .It Bq Er ELOOP @@ -210,6 +213,8 @@ is not a directory, or a path prefix of .Ar special is not a directory. +.It Bq Er EINVAL +A pathname contains a character with the high-order bit set. .It Bq Er EBUSY Another process currently holds a reference to .Fa dir . @@ -220,8 +225,8 @@ points outside the process's allocated address space. .Pp The following errors can occur for a .Em ufs -file system mount: -.Bl -tag -width Er +filesystem mount: +.Bl -tag -width [ENOTBLK] .It Bq Er ENODEV A component of ufs_args .Ar fspec @@ -230,7 +235,7 @@ does not exist. .Ar Fspec is not a block device. .It Bq Er ENXIO -The major device number of +The major device number of .Ar fspec is out of range (this indicates no device driver exists for the associated hardware). @@ -240,11 +245,11 @@ is already mounted. .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 -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. @@ -255,8 +260,8 @@ points outside the process's allocated address space. .Pp The following errors can occur for a .Em nfs -file system mount: -.Bl -tag -width Er +filesystem mount: +.Bl -tag -width [ETIMEDOUT] .It Bq Er ETIMEDOUT .Em Nfs timed out trying to contact the server. @@ -267,16 +272,16 @@ points outside the process's allocated address space. .Pp The following errors can occur for a .Em mfs -file system mount: -.Bl -tag -width Er +filesystem mount: +.Bl -tag -width [EMFILE] .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 -group information for the file system. +group information for the filesystem. .It Bq Er EIO A paging error occurred while reading the super block or cylinder group information. @@ -287,15 +292,17 @@ points outside the process's allocated address space. .Pp .Nm Umount may fail with one of the following errors: -.Bl -tag -width Er +.Bl -tag -width [ENAMETOOLONG] .It Bq Er EPERM The caller is not the super-user. .It Bq Er ENOTDIR A component of the path is not a directory. +.It Bq Er EINVAL +The pathname contains a character with the high-order bit set. .It Bq Er ENAMETOOLONG -A component of a pathname exceeded +A component of a pathname exceeded .Dv {NAME_MAX} -characters, or an entire path name exceeded +characters, or an entire path name exceeded .Dv {PATH_MAX} characters. .It Bq Er ELOOP @@ -304,9 +311,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 -on the file system. +on the filesystem. .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. @@ -316,7 +323,7 @@ A .Em ufs or .Em mfs -mount can also fail if the maximum number of file systems are currently +mount can also fail if the maximum number of filesystems are currently mounted. .Sh SEE ALSO .Xr mount 8 , @@ -328,5 +335,5 @@ Some of the error codes need translation to more obvious messages. .Fn Mount and .Fn umount -function calls appeared in +function calls appeared in .At v6 . -- 2.20.1