Re: [ANNOUNCE] ndevfs - a "nano" devfs

From: David Lang
Date: Tue Jun 28 2005 - 20:33:44 EST


On Tue, 28 Jun 2005, Mike Bell wrote:

On Tue, Jun 28, 2005 at 07:43:10PM -0400, Jim Crilly wrote:
Well it looks like the ALSA library already abstracts the device node
enough that the app itself doesn't know what file is being used because it
just calls snd_card_get_name, snd_open_pcm, etc with the ALSA index. So
wouldn't it be feasible to make ALSA a little bit smarter so that it could
track/find the device nodes no matter what name they have?

You could in theory do that to ALSA. Except for the aforementioned
"how?". How is ALSA supposed to find out what its new device node name
is? You could invent some sort of crazy libudev, but I think it would
require a major redesign of how udev works, forcing it to keep state or
such. The only alternatives I can see are what I already mentioned,
searching every single device node in /dev to find the right one.

Which is why I conclude (and, evidently, Greg agrees) that consistent
naming schemes for /dev are very important. Now if I could just find out
why devfs's failure to allow such broken configurations is a bug in his
mind. :)

worse yet, go way back in the archives and you will find that prior to being merged into the kernel devfs supported two nameing schemes, the one you see now and a compatability version that matched the standard /dev names. one requirement for allowing it to be merged was to remove the compatability set of names.

David Lang

--
There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.
-- C.A.R. Hoare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/