* [PATCH] Update lsscsi to cope with upcoming SCSI sysfs rework
@ 2008-03-18 13:01 Hannes Reinecke
2008-03-19 20:19 ` Douglas Gilbert
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2008-03-18 13:01 UTC (permalink / raw)
To: Douglas Gilbert; +Cc: SCSI Mailing List, Kay Sievers
[-- Attachment #1: Type: text/plain, Size: 744 bytes --]
Hi Doug,
I'm preparing a set of patches to update the SCSI midlayer to
play more nicely with the ongoing driver core rework.
Part of the patchset is to move every SCSI entity
(ie hosts, targets, and devices) into the scsi bus.
So /sys/bus/scsi/devices will look like:
hare@yarrow:/tmp> ls /sys/bus/scsi/devices
2:0:4:0 host0 host1 host2 host3 host4 target2:0:4
Currently 'lsscsi' doesn't handle this properly; it needs
a simple fix to handle it properly. And as this fix doesn't
affect normal parsing we can as well apply it now :-)
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
[-- Attachment #2: lsscsi-sysfs-update --]
[-- Type: text/plain, Size: 586 bytes --]
--- lsscsi-0.19/lsscsi.c.orig 2008-03-18 13:26:59.733340500 +0100
+++ lsscsi-0.19/lsscsi.c 2008-03-18 13:33:54.647271000 +0100
@@ -1650,6 +1650,10 @@ static int sdev_scandir_select(const str
if (strstr(s->d_name, "gen"))
return 0;
/* Above no longer needed but leave for early lk 2.6 series */
+ if (!strncmp(s->d_name, "host", 4)) /* SCSI host */
+ return 0;
+ if (!strncmp(s->d_name, "target", 6)) /* SCSI target */
+ return 0;
if (strchr(s->d_name, ':')) {
if (filter_active) {
struct addr_hctl s_hctl;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Update lsscsi to cope with upcoming SCSI sysfs rework
2008-03-18 13:01 [PATCH] Update lsscsi to cope with upcoming SCSI sysfs rework Hannes Reinecke
@ 2008-03-19 20:19 ` Douglas Gilbert
0 siblings, 0 replies; 2+ messages in thread
From: Douglas Gilbert @ 2008-03-19 20:19 UTC (permalink / raw)
To: Hannes Reinecke; +Cc: SCSI Mailing List, Kay Sievers
Hannes Reinecke wrote:
> Hi Doug,
>
> I'm preparing a set of patches to update the SCSI midlayer to
> play more nicely with the ongoing driver core rework.
> Part of the patchset is to move every SCSI entity
> (ie hosts, targets, and devices) into the scsi bus.
> So /sys/bus/scsi/devices will look like:
>
> hare@yarrow:/tmp> ls /sys/bus/scsi/devices
> 2:0:4:0 host0 host1 host2 host3 host4 target2:0:4
>
> Currently 'lsscsi' doesn't handle this properly; it needs
> a simple fix to handle it properly. And as this fix doesn't
> affect normal parsing we can as well apply it now :-)
Hannes,
I have placed a lssci-0.20beta.tgz tarball on
http://sg.torque.net/scsi/lsscsi.html
It includes your patch.
Doug Gilbert
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-19 22:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-18 13:01 [PATCH] Update lsscsi to cope with upcoming SCSI sysfs rework Hannes Reinecke
2008-03-19 20:19 ` Douglas Gilbert
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.