lkml.org 
[lkml]   [2001]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: LANANA: To Pending Device Number Registrants
On Tue, May 15, 2001 at 08:10:29AM -0700, Linus Torvalds wrote:
> 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,

That is good and the thing other OS do since years. The call it
"DEVCAPS" or "device capabilities". They use bitmasks for this
(which might not be perfect).

> and I don't see why we couldn't expose the "driver
> name" for any file descriptor.

Because we dont like to replace:

if (st.device == MAJOR_1)
bla
else if ...

with

if (!strcmp(st.device,"driver_1") )
bla
else if ...

?

There is no win doing it this way, because every time we add a
new driver that fits or change the name of one, we need add
support for it.

But the device majors are not needed for this, that's true ;-)

Regards

Ingo Oeser
--
10.+11.03.2001 - 3. Chemnitzer LinuxTag <http://www.tu-chemnitz.de/linux/tag>
<<<<<<<<<<<< been there and had much fun >>>>>>>>>>>>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:53    [W:0.196 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site