Skip to content

Commit

Permalink
[SCSI] scsi_proc.c: display sdev->scsi_level correctly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Stern authored and James Bottomley committed Feb 16, 2007
1 parent cc5968c commit 74feb53
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/scsi/scsi_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 74feb53

Please sign in to comment.