Linux primary device number 0

What does using 0 as the primary device number mean? I tried 0; the device does not appear in /dev, but it is indicated in /proc/devices.

I created a char device with register_chrdev:

register_chrdev(0, DEVICE_NAME, &char_fops);

+3
source share
1 answer

Passing 0means that you allow register_chrdev () to choose a dynamic number.

In this case, the function will return this number instead 0.

+2
source

All Articles