Open System Services System Calls Reference Manual (G06.25+, H06.03+)

System Functions (k - m) mknod(2)
A group ID set to the effective group ID of the process or to the group ID of the parent
directory of the le.
Access permission and attribute bits set according to the value of the mode parameter, as
modied by the settings of the le mode creation mask for the process. Access permis-
sion and attribute bits are cleared when the corresponding
le mode creation mask bits
are set. (See the umask(2) reference page.)
Upon successful completion of the function call, the st_atime, st_ctime, and st_mtime elds of
the le are marked for update. The st_ctime and st_mtime elds of the directory that contains
the new entry are also marked for update.
Use From the Guardian Environment
The mknod() function can be used by a Guardian process when the process has been compiled
using the #dene _XOPEN_SOURCE_EXTENDED 1
feature-test macro or an equivalent com-
piler command option.
The mknod() function is one of a set of functions that have the following effects when the rst
of them is called from the Guardian environment:
Two Guardian le-system le numbers (not necessarily the next two available) are allo-
cated for the root directory and the current working directory. These le numbers cannot
be closed by calling the Guardian FILE_CLOSE_ procedure.
The current working directory is assigned from the VOLUME attribute of the Guardian
environment =_DEFAULTS DEFINE.
The use of static memory by the process increases slightly.
These effects occur only when the rst of the set of functions is called. The effects are not cumu-
lative.
Use on Guardian Objects
When S_IFREG is specied for the mode parameter, the path parameter can be any valid version
of the following:
/G/vol/subvol Where vol already exists. If vol does not exist, the function call fails and errno
is set to the value of [EINVAL].
/G/vol/subvol/fileid
Where vol already exists and leid species a regular disk le (an odd unstruc-
tured Enscribe le). If vol does not exist, the function call fails and errno is set
to the value of [EINVAL].
If only /G/vol is specied, the function call fails and errno is set to the value of [EPERM].
When S_IFCHR is specied for the mode parameter, any specication for the path parameter
that uses /G causes the function call to fail and errno to be set to [EPERM].
When S_IFDIR is specied for the mode parameter, a specication of /G/vol for the path param-
eter causes the function call to fail and errno to be set to [EINVAL].
If any other le type value is used for the mode parameter of a le in /G, the function call fails
and errno is set to the value of [EINVAL].
The le access permissions S_ISUID, S_ISGID, and S_ISVTX are ignored when you are creat-
ing les in the Guardian le system.
527186-003 Hewlett-Packard Company 429