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, 15 May 2001, Linus Torvalds wrote:

> What is the horrible app that does something like this?

eject(1), for one thing. And yes, it's ugly beyond belief - don't read
without a barfbag. BTW, LILO is not better, to put it _very_ mildly.

> > /* 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.

Well, yes, if you can extract fs type from fstatfs() output. I don't
think that ->s_magic (i.e. ->f_type) is a good way to do that, though.
We have unused space in struct statfs and IMO putting the name there
is a good idea. Has an additional nice property of killing the crap
like switch by magic numbers.

-
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.251 / U:41.100 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site