mknod


Description:

[ Version ( since = "1.0.55" ) ]
public bool mknod (int32 mode, int32 devmajor, int32 devminor, string path) throws Error

make block, character or FIFO devices

This call creates block or character special devices, or named pipes (FIFOs).

The mode parameter should be the mode, using the standard constants. devmajor and devminor are the device major and minor numbers, only used when creating block and character special devices.

Note that, just like mknod(2), the mode must be bitwise OR'd with S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a regular file). These constants are available in the standard Linux header files, or you can use mknod_b, mknod_c or mkfifo which are wrappers around this command which bitwise OR in the appropriate constant for you.

The mode actually set is affected by the umask.

This function depends on the feature "mknod". See also feature_available.

Parameters:

this

A GuestfsSession object

Returns:

true on success, false on error