All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: James Smart <James.Smart@Emulex.Com>
Cc: Eddie Williams <Eddie.Williams@steeleye.com>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] Print SCSI Inquiry data more compactly
Date: Wed, 21 Jun 2006 11:33:29 -0600	[thread overview]
Message-ID: <20060621173329.GZ1630@parisc-linux.org> (raw)
In-Reply-To: <44997F73.7040903@emulex.com>

On Wed, Jun 21, 2006 at 01:18:43PM -0400, James Smart wrote:
> I agree with Eddie's points, with another small recommendation:
> 
> scsi <2:0:1:0> x00:HP 18.2G:ATLAS10K3_18_SCA:HP05:02:

If you want to get brackets around the 2:0:1:0, you need to talk to
jejb about getting sdev_printk changed.

> where x00 is byte 1 of the inquiry data - device type and qualifier.
> Clarifies the H:C:T:L as well.
> 
> Eddie Williams wrote:
> >Do you need the labels?  How about
> >scsi 2:0:1:0:DASD:HP 18.2G:ATLAS10K3_18_SCA:HP05:02:
> >
> >This keeps it short.  For those that are probably looking at this data
> >the labels are not needed anyway.  It is easy to parse if someone wants.
> >I used "DASD" just because that is what was referenced before.  I think
> >I would prefer the number or "direct access" but either way I would not
> >lose any sleep.

I used scsi_device_type to get the string, so "Direct Access" it is.

Worst case, we get:

scsi 2:0:1:0: Direct-Access     HP 18.2G ATLAS10K3_18_SCA HP05 ANSI ver: 01 CCS

so we're out of room unless we do one or both of:
 - ditch the "ANSI ver:"
 - print the scsi_level instead of "01 CCS"

Using colons instead of spaces to improve parsing is misleading at best;
there's nothing to stop vendors putting colons in their descriptions.
And as I said earlier, there's no need to parse this data anyway.

So we could do:

scsi 2:0:1:0: Direct-Access     xAB HP 18.2G ATLAS10K3_18_SCA HP05 Level: 03

if we really want to see the PQ.  We could even just print the PQ:

scsi 2:0:1:0: Direct-Access     7 HP 18.2G ATLAS10K3_18_SCA HP05 Level: 03

clocking in at a svelte 74 columns.

  reply	other threads:[~2006-06-21 17:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-21 15:42 [PATCH] Print SCSI Inquiry data more compactly Salyzyn, Mark
2006-06-21 16:41 ` Philip R. Auld
2006-06-21 16:50   ` Matthew Wilcox
2006-06-21 17:02     ` Eddie Williams
2006-06-21 17:18       ` James Smart
2006-06-21 17:33         ` Matthew Wilcox [this message]
2006-06-21 18:04           ` Stefan Richter
2006-06-21 19:03             ` Matthew Wilcox
2006-06-21 22:36               ` Stefan Richter
2006-06-22  2:55                 ` Douglas Gilbert
2006-06-21 17:47     ` Philip R. Auld
2006-06-21 22:14       ` Stefan Richter
2006-06-21 22:23         ` Matthew Wilcox
  -- strict thread matches above, loose matches on Subject: below --
2006-06-20 22:27 Matthew Wilcox
2006-06-21 14:50 ` Douglas Gilbert
2006-06-21 15:47   ` Matthew Wilcox

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=20060621173329.GZ1630@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=Eddie.Williams@steeleye.com \
    --cc=James.Smart@Emulex.Com \
    --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.