RE: Unused character device major numbers
"Wichmann, Mats D" <[email protected]> Tue, 15 Nov 2005 08:18:53 -0800
| Newsgroups | gmane.linux.lsb.test-suite |
|---|---|
| Message-ID | <A06801158AE07847B27A52C1A074BC1D0923CD35@fmsmsx404.amr.corp.intel.com> |
>I've been fighting with another ia64 problem for DCC, and thought I
>should get some feedback (plus document the problem in case
>someone else sees it).
>
>Recent test results for ia64 have had a new problem: when opening the
>nonexistent character device, the tests were getting ENODEV
>back instead
>of ENXIO. After pounding my head on the problem for a while, I noticed
>that it started showing up right when devfs was turned on. This
>affected the allocation of major numbers by the kernel, and the pcmcia
>character device (which I didn't even know existed) was bumped
>down from
>252 to 251. That, of course, is the major number assigned by default
>to /home/tet/test_sets/nonexistc. As I read the spec, the behavior I'm
>seeing is therefore correct (because the device exists, but opens are
>not supported on it).
>It seems to me that I can work around this problem by
>recreating /home/tet/test_sets/nonexistc with a different major number.
>The actual major number doesn't seem to matter for the purpose of LSB
>certification, just that it doesn't have a driver. Is that correct?
yes.
>Also, has the LSB considered checking for the major number of
>nonexist{b,c} when creating the devices? Something like this
>pseudocode seems workable:
>
>dev = 254
>while (dev not in /proc/devices{first half})
>do
> dev -= 1
>done
>mknod nonexistc c $dev 1
we picked the number we use because 240-254 is listed as "reserved
for local/experimental use" by LANANA. Your "pcmcia character
device" might fit in this category, but on the other hand, I
see a "reserved for PCMCIA" at 191, perhaps it should be using
that major?