Top index Wirbel home

fs::mknod

mknod(string, int, enum, int, int) - create character or block device node

mknod(string, int, enum, int, int) create a device node of a character or block device. The first argument is the pathname, the second the permissions (e.g. 0600), the third is the type (`blockdev or `chardev), the fourth is the major number of the fifth the minor number. mknod raises an exception of type io in case of an error.

Examples

Create device node for /dev/urandom:

 mknod("/dev/urandom", 0666, `chardev, 1, 9)