Monday, September 14, 2009

Little Sugar: Creating a device node

To create a device node use mknod

mknod /dev/mem c 1 1

here the device name is /dev/mem

c represents character device this can be block device also

the first 1 represents the major number
the second 1 represents the minor number