Re: Unused character device major numbers

Andrew Josey <[email protected]> Tue, 15 Nov 2005 16:12:01 GMT
Newsgroups gmane.linux.lsb.test-suite
Message-ID <[email protected]>
Jeff
Yes you can change the nonexistent files. And yes I agree we ought
to try another method to generate them.
regards
Andrew

On Nov 15, 11:06am in "[Lsb-test] Unused ch", Jeff Licquia wrote:
> 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?
> 
> 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
>