]> err.no Git - linux-2.6/commitdiff
[SCSI] scsi_proc.c: display sdev->scsi_level correctly
authorAlan Stern <stern@rowland.harvard.edu>
Mon, 8 Jan 2007 16:07:41 +0000 (11:07 -0500)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Fri, 16 Feb 2007 17:12:07 +0000 (11:12 -0600)
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>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_proc.c

index 69d6e9b198c42fa6aceb7ebace35e19f305deffc..bb6f051beda82b569a611d330df99c7042be22f0 100644 (file)
@@ -179,9 +179,8 @@ static int proc_print_scsidevice(struct device *dev, void *data)
        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