Copyright (c) 1980 Regents of the University of California.
All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.
@(#)mknod.2 4.1 (Berkeley) 05/09/85
All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.
@(#)mknod.2 4.1 (Berkeley) 05/09/85
MKNOD 2
C 4 NAME
mknod - make a directory or a special file
SYNOPSIS
mknod(name, mode, addr) char *name;DESCRIPTIONMknod creates a new file whose name is the null-terminated string pointed to by name . The mode of the new file (including directory and special file bits) is initialized from mode . (The protection part of the mode is modified by the process's mode mask; see umask (2)). The first block pointer of the i-node is initialized from addr . For ordinary files and directories addr is normally zero. In the case of a special file, addr specifies which special file.Mknod may be invoked only by the super-user.
"SEE ALSO"mkdir(1), mknod(1), filsys(5)DIAGNOSTICSZero is returned if the file has been made; -1 if the file already exists or if the user is not the super-user."ASSEMBLER (PDP-11)"(mknod = 14.)sys mknod; name; mode; addr