Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought



MKNOD(2)        DOMAIN/IX Reference Manual (SYS5)        MKNOD(2)



NAME
     mknod - make a directory, or a special or ordinary file

USAGE
     int mknod (path, mode, dev)
     char *path;
     int mode, dev;

DESCRIPTION
     Mknod creates a new file with the pathname pointed to by
     path.  The mode of the new file is set by mode.  Mode is
     interpreted as follows:
          0170000 file type; one of the following:
               0010000 fifo special
               0040000 directory
               0100000 or 0000000 ordinary file
          0004000 set user ID on execution
          0002000 set group ID on execution
          0000777 access permissions; constructed from the fol-
          lowing
               0000400 read by owner
               0000200 write by owner
               0000100 execute (search on directory) by owner
               0000070 read, write, execute (search) by group
               0000007 read, write, execute (search) by others

     The owner ID of the file is set to the effective user ID of
     the process.  The group ID of the file is set to the effec-
     tive group ID of the process.

     Values of mode other than those above are undefined, and
     should not be used.  The low-order 9 bits of mode are modi-
     fied by the process's file mode creation mask: all bits set
     in the process's file mode creation mask are cleared.  See
     umask(2).  In DOMAIN/IX, dev is ignored.

     Mknod may be invoked only by the super-user for file types
     other than FIFO special.

RETURN VALUE
     Upon successful completion, mknod returns a value of 0.
     Otherwise, a value of -1 returns and errno is set to indi-
     cate the error.

ERRORS
     Mknod will fail and the new file will not be created if one
     or more of the following is true:

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

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



Printed 5/10/85                                           MKNOD-1





MKNOD(2)        DOMAIN/IX Reference Manual (SYS5)        MKNOD(2)



                    directory.

     [ENOENT]       A component of the path prefix does not
                    exist.

     [EROFS]        The directory in which the file is to be
                    created is located on a read-only file sys-
                    tem.

     [EEXIST]       The named file exists.

     [EFAULT]       Path points outside the allocated address
                    space of the process.

RELATED INFORMATION
     mkdir(1), chmod(2), exec(2), umask(2)







































MKNOD-2                                           Printed 5/10/85



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