All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SCSI core: display sdev->scsi_level correctly
@ 2007-02-16 19:38 Alan Stern
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2007-02-16 19:38 UTC (permalink / raw)
  To: James Bottomley; +Cc: SCSI development list

This patch (as833) fixes the "SCSI revision" output for
/proc/scsi/scsi.  If the scsi_level value is 0 (UNKNOWN), we want it
to show up as "0", not "ffffffff".

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>

---

James, this is a resubmission.  Apparently the original message get lost 
in the woodwork.

Alan Stern



Index: usb-2.6/drivers/scsi/scsi_proc.c
===================================================================
--- usb-2.6.orig/drivers/scsi/scsi_proc.c
+++ usb-2.6/drivers/scsi/scsi_proc.c
@@ -179,9 +179,8 @@ static int proc_print_scsidevice(struct 
 	seq_printf(s, "\n");
 
 	seq_printf(s, "  Type:   %s ", scsi_device_type(sdev->type));
-	seq_printf(s, "               ANSI"
-		     " SCSI revision: %02x", (sdev->scsi_level - 1) ?
-		     sdev->scsi_level - 1 : 1);
+	seq_printf(s, "               ANSI  SCSI revision: %02x",
+			sdev->scsi_level - (sdev->scsi_level > 1));
 	if (sdev->scsi_level == 2)
 		seq_printf(s, " CCS\n");
 	else


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] SCSI core: display sdev->scsi_level correctly
@ 2007-01-08 16:07 Alan Stern
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2007-01-08 16:07 UTC (permalink / raw)
  To: James Bottomley; +Cc: SCSI development list

This patch (as833) fixes the "SCSI revision" output for
/proc/scsi/scsi.  If the scsi_level value is 0 (UNKNOWN), we want it
to show up as "0", not "ffffffff".

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>

---

Index: usb-2.6/drivers/scsi/scsi_proc.c
===================================================================
--- usb-2.6.orig/drivers/scsi/scsi_proc.c
+++ usb-2.6/drivers/scsi/scsi_proc.c
@@ -179,9 +179,8 @@ static int proc_print_scsidevice(struct 
 	seq_printf(s, "\n");
 
 	seq_printf(s, "  Type:   %s ", scsi_device_type(sdev->type));
-	seq_printf(s, "               ANSI"
-		     " SCSI revision: %02x", (sdev->scsi_level - 1) ?
-		     sdev->scsi_level - 1 : 1);
+	seq_printf(s, "               ANSI  SCSI revision: %02x",
+			sdev->scsi_level - (sdev->scsi_level > 1));
 	if (sdev->scsi_level == 2)
 		seq_printf(s, " CCS\n");
 	else


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-02-16 19:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-16 19:38 [PATCH] SCSI core: display sdev->scsi_level correctly Alan Stern
  -- strict thread matches above, loose matches on Subject: below --
2007-01-08 16:07 Alan Stern

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.