Каталог требований LSB Core 3.1

Требования для функции '__xmknod'
StandardIDDescription
SUSv3__xmknod.01 The mknod() function shall create a new file named by the pathname to which the argument path points
SUSv3app.__xmknod.02 The file type for path is OR'ed into the mode argument, and the application shall select one of the following symbolic constants
SUSv3app.__xmknod.03 The only portable use of mknod() is to create a FIFO-special file. If mode is not S_IFIFO or dev is not 0, the behavior of mknod() is unspecified
SUSv3app.__xmknod.04 The permissions for the new file are OR'ed into the mode argument, and may be selected from any combination of the following symbolic constants
SUSv3__xmknod.05 The user ID of the file shall be initialized to the effective user ID of the process
SUSv3__xmknod.06 The group ID of the file shall be initialized to either the effective group ID of the process or the group ID of the parent directory. Implementations shall provide a way to initialize the file's group ID to the group ID of the parent directory. Implementations may, but need not, provide an implementation-defined way to initialize the file's group ID to the effective group ID of the calling process.
SUSv3__xmknod.07 The owner, group, and other permission bits of mode shall be modified by the file mode creation mask of the process. The mknod() function shall clear each bit whose corresponding bit in the file mode creation mask of the process is set.
SUSv3__xmknod.08 If path names a symbolic link, mknod() shall fail and set errno to [EEXIST]
SUSv3__xmknod.09 Upon successful completion, mknod() shall mark for update the st_atime, st_ctime, and st_mtime fields of the file
SUSv3__xmknod.10 Also, the st_ctime and st_mtime fields of the directory that contains the new entry shall be marked for update
SUSv3__xmknod.11 Only a process with appropriate privileges may invoke mknod() for file types other than FIFO-special
SUSv3__xmknod.12 Upon successful completion, mknod() shall return 0
SUSv3__xmknod.13 Otherwise, it shall return -1, the new file shall not be created, and errno shall be set to indicate the error
SUSv3__xmknod.90 The mknod() function shall fail if:
SUSv3__xmknod.90.01 [EACCES] A component of the path prefix denies search permission, or write permission is denied on the parent directory.
SUSv3__xmknod.90.02 [EEXIST] The named file exists.
SUSv3__xmknod.90.03 [EINVAL] An invalid argument exists.
SUSv3__xmknod.90.04 [EIO] An I/O error occurred while accessing the file system.
SUSv3__xmknod.90.05 [ELOOP] A loop exists in symbolic links encountered during resolution of the path argument.
SUSv3__xmknod.90.06 [ENAMETOOLONG] The length of a pathname exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.
SUSv3__xmknod.90.07 [ENOENT] A component of the path prefix specified by path does not name an existing directory or path is an empty string.
SUSv3__xmknod.90.08 [ENOSPC] The directory that would contain the new file cannot be extended or the file system is out of file allocation resources.
SUSv3__xmknod.90.09 [ENOTDIR] A component of the path prefix is not a directory.
SUSv3__xmknod.90.10 [EPERM] The invoking process does not have appropriate privileges and the file type is not FIFO-special.
SUSv3__xmknod.90.11 [EROFS] The directory in which the file is to be created is located on a read-only file system.
SUSv3__xmknod.91 The mknod() function may fail if:
SUSv3__xmknod.91.01 [ELOOP] More than {SYMLOOP_MAX} symbolic links were encountered during resolution of the path argument.
SUSv3__xmknod.91.02 [ENAMETOOLONG] Pathname resolution of a symbolic link produced an intermediate result whose length exceeds {PATH_MAX}.
LSB&__xmknod.01 The value of ver shall be 1 or the behavior of __xmknod() is undefined
The text in the Description column of SUSv3 requirements is reproduced from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html