COHERENT manpages

This page displays the COHERENT manpage for mknod() [Create a special file].

List of available manpages
Index


mknod() -- System Call (libc)

Create a special file
#include <sys/ino.h>
#include <sys/stat.h>
mknod(name, mode, addr)
char *name; int mode, addr;

mknod() is the COHERENT system call that creates a special file.  A special
file is one through which a device is accessed, or a named pipe.

mode gives the type of special file to be created.  It can be set to IFBLK,
for  a  block-special device,  such  as  a disk  driver;  to  IFCHR, for  a
character-special device,  such as  a serial-port  driver; to IFDIR,  for a
directory; or  to IFPIPE, for a named pipe.   mode also contains permission
mode bits.

address  is a  parameter interpreted  by the driver;  it might  specify the
channel of a multiplexor or the  unit number of a drive.  Note that this is
not used with named pipes.

If all goes  well, mknod() returns zero.  If an  error occurs, it returns a
negative value and sets errno to an appropriate value.

See Also

libc,
device drivers,
named pipe,
pipe()

Notes

Only the superuser root can use mknod(). This is a security feature.