[email protected] (Kamil Rytarowski) writes:
>=46rom end-user point of view major and minor numbers don't matter most o=
>f
>the time (are there exceptions?) and it might be picked by the kernel
>dynamically.
When the kernel choses major numbers dynamically, it must also provide
a dynamically generated mapping to userland.
Minor numbers usually translate 1:1 into device units, they cannot be
chosen dynamically.
End-users are usually concerned with major/minor numbers in that they
don't change (e.g. for find -xdev) and sometimes don't change over
reboots or even re-installations (think about backup).
The most simple method to assign major numbers is to assign them
during installation. Can be as simple as a file in /etc as a registry,
MAKEDEV to create /dev entries and a system call (probably sysctl)
that augments the device switches. Combining the system call with
the module loader is possible, but won't work for autoloaded modules
(not a problem for HAXM).
--
--
Michael van Elst
Internet: [email protected]
"A potential Snark may lurk in every tree."