Re: proc_name in sysfs

Patrick Mansfield
2005-04-08T00:00:34Z

On Thu, Apr 07, 2005 at 11:06:03AM +1000, Douglas Gilbert wrote:
> Patrick Mansfield wrote:
> >On Wed, Apr 06, 2005 at 01:40:04PM +0200, Frederic TEMPORELLI wrote:
> >
> >
> >>2/ now, how can we get the adapter module name from sysfs ?
> >
> >
> >Why do you need it?

> Patrick,
> lsscsi currently uses proc_name so it needs to be
> changed to use the above logic (if LLDs are going
> to stop populating proc_name).

Oops, I didn't notice, I had assumed it was using the sysfs layout.

Yes, seems like it should use the sysfs driver info, proc_name is
rather useless in sysfs context.

> It has been suggested that I extend lsscsi to show
> transport info (as seen from the HBA) found in the
> various *_transport directories in sysfs.

As an option that sounds nice.

> Also I have been thinking about ways to list less
> tha all scsi devices. For example: "lsscsi 1:0:3:0"
> to look at one device and "lsscsi 1:-" for all scsi
> devices hanging off host1. I'm not sure whether
> "lsscsi /dev/sda" is a good idea. Any suggestions?

Sounds good, but maybe not (directly) for /dev. udevinfo can supply that,
it has a /dev to /sys mapping:

[elm3b79 patman]$ udevinfo -q path -n /udev/mydisk-sdag
/block/sdm

-- Patrick Mansfield