Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mount(8)

umount(8)

MOUNT(2)                             BSD                              MOUNT(2)



NAME
     mount, umount - mount or remove file system

SYNOPSIS
     mount(special, name, rwflag)
     char *special, *name;
     int rwflag;

     umount(special)
     char *special;

DESCRIPTION
     mount announces to the system that a removable file system has been
     mounted on the block-structured special file special; from now on,
     references to file name will refer to the root file on the newly mounted
     file system.  special and name are pointers to null terminated strings
     containing the appropriate path names.

     name must exist already and it must be a directory.  Its old contents are
     inaccessible while the file system is mounted.

     The rwflag argument determines whether the file system can be written on.
     If it is 0, writing is allowed; if nonzero, no writing is done.
     Physically write-protected and magnetic tape file systems must be mounted
     read-only or errors will occur when access times are updated, whether or
     not any explicit write is attempted.

     umount announces to the system that the special file is no longer to
     contain a removable file system.  The associated file reverts to its
     ordinary interpretation.

ERRORS
     mount will fail when one of the following occurs:

     [ENAMETOOLONG]   A component of either pathname exceeded 255 characters,
                      or the entire length of either pathname exceeded 1023
                      characters.

     [ELOOP]          Too many symbolic links were encountered in translating
                      either pathname.

     [EPERM]          The caller is not the super-user.

     [ENOENT]         A component of name does not exist.

     [ENODEV]         A component of special does not exist.

     [ENOTBLK]        special is not a block device.

     [ENXIO]          The major device number of special is out of range.
                      This indicates no device driver exists for the
                      associated hardware.

     [ENOTDIR]        A component of name is not a directory, or a path prefix
                      of special is not a directory.

     [EINVAL]         The super block for the file system had a bad magic
                      number or an out-of-range block size.

     [EBUSY]          Another process currently holds a reference to name, or
                      special is already mounted.
     [EMFILE]         No space remains in the mount table.

     [ENOMEM]         Not enough memory was available to read the cylinder
                      group information for the file system.

     [EIO]            An I/O error occurred while reading the super block or
                      cylinder group information.

     [EFAULT]         special or name points outside the process' allocated
                      address space.

     umount may fail with one of the following errors:

     [ENOTDIR]        A component of the path prefix is not a directory.

     [ENAMETOOLONG]   A component of a pathname exceeded 255 characters, or an
                      entire pathname exceeded 1023 characters.

     [ELOOP]          Too many symbolic links were encountered in translating
                      the pathname.

     [EPERM]          The caller is not the super-user.

     [ENODEV]         special does not exist.

     [ENOTBLK]        special is not a block device.

     [ENXIO]          The major device number of special is out of range.
                      This indicates no device driver exists for the
                      associated hardware.

     [EINVAL]         The requested device is not in the mount table.

     [EBUSY]          A process is holding a reference to a file located on
                      the file system.

     [EIO]            An I/O error occurred while writing the super block or
                      other cached file system information.

     [EFAULT]         special points outside the process' allocated address
                      space.

SEE ALSO
     mount(8), umount(8)

DIAGNOSTICS
     mount returns 0 if the action occurred, -1 if special is inaccessible or
     not an appropriate file, if name does not exist, if special is already
     mounted, if name is in use, or if there are already too many file systems
     mounted.

     umount returns 0 if the action occurred; -1 if if the special file is
     inaccessible or does not have a mounted file system, or if there are
     active files in the mounted file system.

NOTES
     The following error, not returned under Domain/OS BSD, may be returned by
     mount under other implementations:

     [EINVAL]         Either pathname contains a character with the high-order
                      bit set.

     The following error, not returned under Domain/OS BSD, may be returned by
     umount under other implementations:

     [EINVAL]         The pathname contains a character with the high-order
                      bit set.

BUGS
     Some of the error codes need translation to more obvious messages.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026