Re: LANANA: To Pending Device Number Registrants

Alan Cox
2001-05-15T09:30:52Z

> But the fact remains that some users want to (a) avoid devfs and (b) have
> static maintenance. And I'm ok with that too, but only if the static major
> number is in the form of a _generic_ number that has absolutely nothing to
> do with any specific drivers (which is why I'd be perfecly ok with still
> adding a "disk" major number, but which is why I do NOT want to have Peter
> give out "the random number of today" to various stupid device drivers).
> So we seem to be in violent agreement here.

Ok.

Then we need to open the second discussion which is:

Given a file handle 'X' how do I find out what ioctl groups I should apply to
it. So we can go from

if(MAJOR(st.st_rdev) == ST_MAJOR)
issue_scsi_ioctls
else if(MAJOR(st.st_rdev) == FTAPE_MAJOR)
issue_ftape_ioctls
else ..
else
error

to

/* Use scsi if possible [scsi, ide-scsi, usb-scsi, ...] */
if(HAS_FEATURE_SET(fd, "scsi-tape"))
...
else if(HAS_FEATURE_SET(fd, "floppy-tape"))
..

Alan