On 19.02.2019 08:17, Michael van Elst wrote: > n54%gmx.com@localhost (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). > I feel corrected that non -U builds need it for other purposes, mostly file grants. As discussed internally an issue with devfs is that (according to my observation) that expectations raise too much and people start to demand functionality comparable to automounter. Something similar appeared in Linux with all the devfs, udev, sysfs etc.. Also touching major numbers can trigger temptation to change namespace of devices from numbers to strings (I don't really see win myself in exchange for compat breakage)... so better to leave it as it is. For cases such as HAXM the least bad solution is to add haxmfs and union mount over /dev (providing /dev/hax_vm*/* nodes).. however until it will become a blocker to ship only 8 VMs x 16 VCPUs I will keep using traditional mknod(2) approach. If there are no more concerns I will apply this patch: http://netbsd.org/~kamil/patch-00086-pkgsrc-majors.2.txt Probably with bumped major numbers as we are soon acquiring another major for KCOV.
Attachment:
signature.asc
Description: OpenPGP digital signature