Mknod. Microware C Compiler
Реклама
Реклама
Chapter 3. C System Calls
Diagnostics
-1 is returned if "pn" is a bad path number, or attempting to seek to a position before the beginning of a file.
See Also
creat(), open(), Standard Library function "fseek"
Mknod
Name
Mknod
— create a directory
Synopsis
#include <modes.h> mknod (char *fname, int desc);
Assembler Equivalent
os9 I$MAKDIR
Description
This call may be used to create a new directory. "Fname" should point to a string containing the desired name of the directory. "Desc" is a descriptor specifying the desired mode (file type) and permissions of the new file.
The include file defines the possible values for "desc" as follows:
#define S_IREAD 0x01
#define S_IWRITE 0x02
#define S_IEXEC 0x04
#define S_IOREAD 0x08
#define S_IOWRITE 0x10
#define S_IOEXEC 0x20
#define S_ISHARE 0x40
/* owner read */
/* owner write */
/* owner execute */
/* public read */
/* public write */
/* public execute */
/* sharable */
Diagnostics
Zero is returned if the directory has been successfully made; -1 if the file already exists.
See Also
OS-9 command "makdir"
28
Скачать
Реклама