MKNOD(2) HP Integral PC MKNOD(2) MKNOD(2) HP Integral PC MKNOD(2) MKNOD(2) HP Integral PC MKNOD(2) MKNOD(2) HP Integral PC MKNOD(2) NAME NAME NAME NAME mknod - make a directory, or a special or ordinary file SYNOPSIS SYNOPSIS SYNOPSIS SYNOPSIS int mknod (path, mode, dev) char *path; int mode, dev; DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION Mknod creates a new file named by the path name pointed to by path . The mode of the new file is initialized from mode . Where the value of mode is interpreted as follows: 0170000 file type; one of the following: 0010000 fifo special 0020000 character special 0040000 directory 0060000 block special 0100000 or 0000000 ordinary file 0004000 set user ID on execution 0002000 set group ID on execution 0001000 save text image after execution 0000777 access permissions; constructed from the following 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 Values of mode other than those above are undefined and should not be used. The file's owner ID is set to the process's effective user ID. The file's group ID is set to the process's effective group ID. The low-order 9 bits of mode are modified by the process's file mode creation mask: all bits set in the process's file mode creation mask are cleared. See umask (2). If mode indicates a block or character special file, dev is a configuration dependent specification of a character or block I/O device. If mode does not indicate a block special or character special device, dev is ignored. Mknod will fail and the new file will not be created if one or more of the following are true: A component of the path prefix is not a directory. [ENOTDIR] A component of the path prefix does not exist. [ENOENT] Hewlett-Packard - 1 - (printed 12/12/84) MKNOD(2) HP Integral PC MKNOD(2) MKNOD(2) HP Integral PC MKNOD(2) MKNOD(2) HP Integral PC MKNOD(2) MKNOD(2) HP Integral PC MKNOD(2) The directory in which the file is to be created is located on a read-only file system. [EROFS] The named file exists. [EEXIST] Path points outside the process's allocated address space. [EFAULT] RETURN VALUE RETURN VALUE RETURN VALUE RETURN VALUE Upon successful completion a value of 0 is returned. Otherwise, a value of -1 is returned and errno is set to indicate the error. SEE ALSO SEE ALSO SEE ALSO SEE ALSO mkdir(1), mknod(1M), chmod(2), exec(2), umask(2), fs(5). Hewlett-Packard - 2 - (printed 12/12/84)