On Mon, Apr 19, 2010 at 11:39:28AM +0200, Kay Sievers wrote: > On Sun, Apr 18, 2010 at 23:08, Marco d'Itri <m...@linux.it> wrote: > >> On Apr 18, Mario 'BitKoenig' Holbe <mario.ho...@tu-ilmenau.de> wrote: > >> > KERNEL=="audio", NAME="%k0", SYMLINK+="%k" > > /etc/udev/rules.d/00-local.rules > > If this specifies a name different than the kernel device name, it is > something that should be fixed.
These are my own local rules and yes, these rules specify lots of rename-rules like the one above. Call it obsessive (well, this is what I'm calling it sometimes :)) or whatever you like. I personally don't like the kernel's style to threat 0-devices naming different than subsequent ones and prefer the other way around. I was free to do this all the time from the beginning of ages (i.e. static, fs-based /dev) up to udev 141. I always did this at my own risk and it was never a problem. I don't want to push my opinion about this to others, and I'm sure there are others with exactly the opposite opinion. I'd just like to be free again :) > > /lib/udev/rules.d/55-dm.rules > Device-mapper is work-in-progress, and probably just uses NAME="" > which is ok. (should still not be done that way, but it does not > matter here). As Marco already pointed out: NAME="mapper/$env{DM_NAME}" > > /lib/udev/rules.d/50-udev-default.rules > It's probably just for support of older kernels, or for deprecated > subsystems drivers like "ieee1394", which need to be replaced by > "firewire". There should be no rule that specifies a name that is > different from the kernel device name. I don't know what you exactly consider "different"... just a few examples for you to explain which of those you consider "good" and which "bad": SUBSYSTEM=="bsg", NAME="bsg/%k" SUBSYSTEMS=="usb", KERNEL=="hiddev[0-9]*", NAME="usb/%k" SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}" KERNEL=="capi", NAME="capi20", KERNEL=="capi[0-9]*", NAME="capi/%n" KERNEL=="card[0-9]*", NAME="dri/%k" KERNEL=="hw_random", NAME="hwrng" KERNEL=="cdemu[0-9]*", NAME="cdemu/%n" KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%n" KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" > > Apart from my own rules this seems to be quite a common behaviour. > Swapping plain kernel-defined names with symlinks is not supported. It > may work, but the behavior is undefined. Well, this is basically the reason why in my own local rules I generally provide symlinks from the kernel-defined names to the ones I prefer (which triggers the bug we were talking about here :)). > > Well, I think moving device nodes forth and back in the /dev tree is > > quite common behavior > Upstream udev does not really support this. Kernel device names are > defined (and optionally created and deleted) by the kernel these days. All right, devfs-style so to say. regards Mario -- The question of whether a computer can think is no more interesting than the question of whether a submarine can swim. -- E. W. Dijkstra
signature.asc
Description: Digital signature