From: Hannes Reinecke <hare@suse.de>
To: Douglas Gilbert <dougg@torque.net>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>,
Kay Sievers <kay.sievers@vrfy.org>
Subject: [PATCH] Update lsscsi to cope with upcoming SCSI sysfs rework
Date: Tue, 18 Mar 2008 14:01:50 +0100 [thread overview]
Message-ID: <47DFBD3E.8050502@suse.de> (raw)
[-- 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;
next reply other threads:[~2008-03-18 13:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 13:01 Hannes Reinecke [this message]
2008-03-19 20:19 ` [PATCH] Update lsscsi to cope with upcoming SCSI sysfs rework Douglas Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47DFBD3E.8050502@suse.de \
--to=hare@suse.de \
--cc=dougg@torque.net \
--cc=kay.sievers@vrfy.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.