Re: [PATCH] /proc/scsi/map

Andries Brouwer (aebr@win.tue.nl)
Thu, 20 Jun 2002 18:55:53 +0200


On Thu, Jun 20, 2002 at 08:13:22AM -0700, Linus Torvalds wrote:

> Try it out yourself. Just do
>
> mount -t driverfs /devices /devices
>
> and then look at the whole glory

OK. I just did.

# find . -name name -exec cat {} ";"
...
PCI device 8086:7113
figure out some name...
USB device 0000:0000
figure out some name...
USB device 0000:0000
figure out some name...
USB device 0000:0000
figure out some name...
USB device 0000:0000
figure out some name...
usb_name
PCI device 8086:7112
...

At present this does not look very useful, but it may have future.

But there is a pressing present problem. What name do my devices have?
I plug in a SmartMedia card reader. It will become some SCSI device.
But which one? The easiest way to find out is just to try
"blockdev --rereadpt /dev/sdX" for X=a,b,c,d,e to find: yes, today
this thing is /dev/sde.

Of course file system names are free, so instead of asking what sdX
this device is, I should ask what major:minor this device is.

In other words, there is the difficult naming problem,
but there is also the translation problem. The user does
not recognize the device as USB device 04e6:0005:...
She thinks of this thing as her DaneElec card reader.

So, there are many names and partial names for the same object,
and translation is required from one name to another.

Kurt's patch does not solve all problems, but what it provides
is a small translation table between different names for the same thing.
That information is not easily obtainable without his patch.
I do not see that driverfs provides such information.

Andries

[And please, Linus, do not use words like "despise".
Lately I have seen an increase in the amount of insults
between Linux people. That is unnecessary.]
-
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/