int mknod(int dir_fd, const char *path, int path_len, int mode, int dev);
This syscall creates files in the passed path and dir. The type is chosen by
code
, which uses the same format as stat
’s mode field.
The syscall returns 0
or -1
on failure, with the following errno:
EACCES
: Bad memory addresses.
EINVAL
: The passed path length is way too big, or the mode is invalid.
EIO
: Internal error.