Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mount(2) — DG/UX 5.4R3.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

umount(2)

fattach(3C)



mount(2)                       DG/UX 5.4R3.00                       mount(2)


NAME
       mount - mount a file system

SYNOPSIS
       #include <sys/mount.h>

       int  mount (const char *special, const char *path, int flag,
            const char fstype, const char *dataptr, int datalen);

   where:
       special     Address of a pathname of a block special file

       path        A string indicating the file on which to mount the file
                   system

       flag        A bitmask of flags indicating mount options

       fstype      The type name for the file system

       dataptr     An block address for file system specific data

       datalen     The length of the data specified at dataptr

DESCRIPTION
       Mount adds the file system device identified by special to the set of
       active file system devices, using the file identified by path as the
       mount point.  The flag contains a bitmask of flags (see below);
       ordinarily the MS_DATA flag must be set.  The dataptr and datalen
       describe the block address and the length of file system specific
       data.  Mount has the following consequences:

       ⊕      The filename store contained on special is added to the system
              filename store.  Thus, all files contained on special can be
              named.

       ⊕      References to the mount point will refer to the root directory
              on the mounted file system device.

       ⊕      The original sub-tree under the mount point disappears from
              the system filename store.  However, the files in that subtree
              remain unchanged.  These files still exist, but can no longer
              be named.  Already opened file descriptors for these files
              will remain valid.


       Flag contains the following bitmap options, defined in <sys/mount.h>:

       MSDATA
              This is ordinarily required; it indicates the arguments
              fstype, dataptr, and datalen are being used.  (For backward
              compatibility, if this flag is not set, then fstype is assumed
              to be the same as the root file system, and dataptr and
              datalen assumed to be zero.)




Licensed material--property of copyright holder(s)                         1




mount(2)                       DG/UX 5.4R3.00                       mount(2)


       MSRDONLY
              If this is set, then any writing to the file system is not
              allowed.  Otherwise writing is controlled by individual file
              permissions.

       MSNOSUID
              This indicates the file system does not support setuid and
              setgid semantics.

       MSREMOUNT
              This flag indicates the file system is already mounted and any
              associated attributes of the mount should be modified to that
              of this call.  This is used to change options, however not all
              changes are possible.  For example, it is impossible to make a
              currently mounted writeable file system to be read only.

       If an error occurs, no changes are made.

ACCESS CONTROL
       The effective user id of the calling process must be superuser.  The
       exception to this is when the string namefs is use for the value of
       fstype.  In this case, the effective user id of the calling process
       must be superuser, or the effective user id must be the owner of path
       and have write permission to path.

RETURN VALUE
       0      Completed successfully.

       -1     An error occurred.  errno is set to indicate the error.

DIAGNOSTICS
       Errno may be set to one of the following error codes:

       EBUSY          Path is being used by another mount, is someone's
                      current working path or is otherwise open for access.

       EBUSY          The device associated with special is currently
                      mounted.

       EBUSY          The system limit on mounted devices has been reached.

       EINVAL         System information on the file system is bad.

       ENOSPC         Not enough memory was available to read system
                      information from the file system.

       EIO            An I/O error occurred while reading system information
                      from the file system.

       ENOTBLK        Special is not a block special device.

       ENOTDIR        Path is not a directory and the file system type
                      requires a directory.




Licensed material--property of copyright holder(s)                         2




mount(2)                       DG/UX 5.4R3.00                       mount(2)


       ENXIO          The device associated with special does not exist.

       EPERM          Permission to mount a file system device is denied to
                      the calling process.

       EROFS          Path resides on a read-only file system.

       ENOENT         Either special or path do not exist.

       ENOENT         A non-terminal component of either special or path
                      does not exist.

       ENOTDIR        A non-terminal component of either special or path was
                      not a path or symbolic link.

       ENAMETOOLONG   Either special or path exceeds the length limit for
                      pathnames.

       ENAMETOOLONG   A component of either special or path exceeds the
                      length limit for filenames.

       ENOMEM         There are not enough system resources to resolve
                      either special or path or to expand a symbolic link.

       ELOOP          The number of symbolic links encountered while
                      resolving either special or path exceeded MAXSYMLINKS.
                      A symbolic link cycle is suspected.

       EPERM          Either special or path contains a character not in the
                      allowed character set.

       EFAULT         Either special or path does not completely reside in
                      the process's address space or either special or path
                      does not terminate in the process's address space.

SEE ALSO
       dgmount(2), umount(2).  fattach(3C).




















Licensed material--property of copyright holder(s)                         3


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