How to get a list of major number -> driver associations

11,975

Documentation/admin-guide/devices.txt in the kernel source code documents the allocation process and lists all the allocated device numbers. sd gets a whole bunch of major device numbers because of the large number of devices it can handle: major 8 covers /dev/sda to /dev/sdp, major 65 covers /dev/sdq to /dev/sdaf, 66 /dev/sdag to /dev/sdav and so on all the way to 135 for /dev/sdig to /dev/sdiv (for a total of 256 disk devices).

Share:
11,975

Related videos on Youtube

Aleksandr Kostyrev
Author by

Aleksandr Kostyrev

Updated on September 18, 2022

Comments

  • Aleksandr Kostyrev
    Aleksandr Kostyrev over 1 year

    The Linux Programming Interface states:

    Each device driver registers its association with a specific major device ID, and this association provides the connection between the device special file and the device driver.

    Is it possible to obtain the list of those associations?