From 74feb53e8b5020e790e12c6331cbe885d276cc60 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Mon, 8 Jan 2007 11:07:41 -0500 Subject: [SCSI] scsi_proc.c: display sdev->scsi_level correctly 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 Signed-off-by: James Bottomley --- drivers/scsi/scsi_proc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c index 69d6e9b198c4..bb6f051beda8 100644 --- a/drivers/scsi/scsi_proc.c +++ b/drivers/scsi/scsi_proc.c @@ -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 -- cgit v1.2.3