Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74feb53e authored by Alan Stern's avatar Alan Stern Committed by James Bottomley
Browse files

[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: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent cc5968c8
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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