On Tue, Mar 25, 2008 at 01:36:51PM -0700, H. Peter Anvin wrote:Randy Dunlap wrote:It's not so much an issue of a few tens of lines of user space code, but rather the fact that something that should be O(1) is currently O(n).Come on people, adding symlinks for device major:minor numbers in sysfsAh, there's some sanity. :)
to save a few 10s of lines of userspace code? Can things get sillier?
You can add a single udev rule to probably build these in a tree in /dev
if you really need such a thing...
And what's wrong with your new ioctl recomendation?
"should"? why? Is this some new requirement that everyone needs? I've
_never_ seen anyone ask for the ability to find sysfs devices by
major:minor number in O(1) time. Is this somehow a place where such
optimization is warranted?