File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / man / man2 / mknod.2
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:26:31 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v121, HEAD
Power 6/32 Unix version 1.21

.TH MKNOD 2 "2 July 1983"
.UC 4
.SH NAME
mknod \- make a special file
.SH SYNOPSIS
.nf
.ft B
mknod(path, mode, dev)
char *path;
int mode, dev;
.fi
.ft R
.SH DESCRIPTION
.I Mknod
creates a new file
whose name is
.I path.
The mode of the new file
(including special file bits)
is initialized from
.IR mode .
(The protection part of the mode
is modified by the process's mode mask; see
.IR umask (2)).
The first block pointer of the i-node
is initialized from
.I dev 
and is used to specify which device the special file
refers to.
.PP
If mode indicates a block or character special file,
.I dev
is a configuration dependent specification of a character or block
I/O device.  If
.I mode
does not indicate a block special or character special device,
.I dev
is ignored.
.PP
.I Mknod
may be invoked only by the super-user.
.SH "RETURN VALUE
Upon successful completion a value of 0 is returned.
Otherwise, a value of \-1 is returned and \fIerrno\fP
is set to indicate the error.
.SH ERRORS
.I Mknod
fails and the file mode is unchanged if:
.TP 15
[EPERM]
The process's effective user ID is not super-user.
.TP 15
[EPERM]
The pathname contains a character with the high-order bit set.
.TP 15
[ENOTDIR]
A component of the path prefix is not a directory.
.TP 15
[ENOENT]
A component of the path prefix does not exist.
.TP 15
[EROFS]
The named file resides on a read-only file system.
.TP 15
[EEXIST]
The named file exists.
.TP 15
[EFAULT]
.I Path
points outside the process's allocated address space.
.TP 15
[ELOOP]
Too many symbolic links were encountered in translating the pathname.
.SH "SEE ALSO"
chmod(2), stat(2), umask(2)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.