On Tue, 15 May 2001, Alan Cox wrote: > > 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 Ugh. You do this? And you don't realize that the whole system is too broken for words? What is the horrible app that does something like this? The fix, I think, is to make the ioctl commands much more regular. That is probably true in general, and fixing that would hopefully fix the need for horrible code like the above. That said: > /* Use scsi if possible [scsi, ide-scsi, usb-scsi, ...] */ > if(HAS_FEATURE_SET(fd, "scsi-tape")) > ... > else if(HAS_FEATURE_SET(fd, "floppy-tape")) > .. doesn't look horrible, and I don't see why we couldn't expose the "driver name" for any file descriptor. We already do for some: "fstatfs()" is largely the same thing on another level. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Re: LANANA: To Pending Device Number Registrants Linus Torvalds
- Re: LANANA: To Pending Device Number Registrants Alan Cox
- Re: LANANA: To Pending Device Number Registrants Linus Torvalds
- Re: LANANA: To Pending Device Number Registrants Alan Cox
- Re: LANANA: To Pending Device Number Registrants Alexander Viro
- Re: LANANA: To Pending Device Number Registrants Alan Cox
- Re: LANANA: To Pending Device Number Registrants Alexander Viro
- Re: LANANA: To Pending Device Number Registrants Alan Cox
- Re: LANANA: To Pending Device Number Registrants Linus Torvalds
- Re: LANANA: To Pending Device Number Registrants Alan Cox
- Re: LANANA: To Pending Device Number Registrants Linus Torvalds
- Re: LANANA: To Pending Device Number Registrants Alexander Viro
- Re: LANANA: To Pending Device Number Registrants James Simmons
- Re: LANANA: To Pending Device Number Registrants Alexander Viro
- Re: LANANA: To Pending Device Number Registrants James Simmons
- Re: LANANA: To Pending Device Number Registrants Alexander Viro
- Re: LANANA: To Pending Device Number Registrants James Simmons
- Re: LANANA: To Pending Device Number Registrants Ingo Oeser
- Re: LANANA: To Pending Device Number Registrants James Simmons
- Re: LANANA: To Pending Device Number Registrants Alexander Viro
- Re: LANANA: To Pending Device Number Registrants Helge Hafting