


      MOUNT(2)                    (UNIX 5.0)                   MOUNT(2)



      NAME
           mount - mount a file system

      SYNTAX
           int mount (spec, dir, rwflag)
           char *spec, *dir;
           int rwflag;

      DESCRIPTION
           Mount requests that a removable file system contained on the
           block special file identified by spec be mounted on the
           directory identified by dir.  Spec and dir are pointers to
           path names.

           Upon successful completion, references to the file dir will
           refer to the root directory on the mounted file system.

           The low-order bit of rwflag is used to control write
           permission on the mounted file system; if 1, writing is
           forbidden, otherwise writing is permitted according to
           individual file accessibility.

           Mount may be invoked only by the super-user.

           Mount will fail if one or more of the following are true:

                The effective user ID is not super-user.  [EPERM]

                Any of the named files does not exist.  [ENOENT]

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

                Spec is not a block special device.  [ENOTBLK]

                The device associated with spec does not exist.
                [ENXIO]

                Dir is not a directory.  [ENOTDIR]

                Spec or dir points outside the process's allocated
                address space.  [EFAULT]

                Dir is currently mounted on, is someone's current
                working directory or is otherwise busy.  [EBUSY]

                The device associated with spec is currently mounted.
                [EBUSY]

      RETURN VALUE
           Upon successful completion a value of 0 is returned.
           Otherwise, a value of -1 is returned and errno is set to



      Page 1                                         (73 A2 02MTA REV1)






      MOUNT(2)                    (UNIX 5.0)                   MOUNT(2)



           indicate the error.

      SEE ALSO
           umount(2).

      BUGS
           Currently, a tape cannot be mounted, and physical write-
           protect cannot be set.















































      Page 2                                         (73 A2 02MTA REV1)



