summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_proc.c
diff options
context:
space:
mode:
authorMatthew Wilcox <matthew@wil.cx>2006-07-04 18:15:20 (GMT)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-08-06 20:59:26 (GMT)
commit4ff36718ede26ee2da73f2dae94d71e2b06845fc (patch)
treed9188d88bb3f60427c9976ed0f3da8bf433bb757 /drivers/scsi/scsi_proc.c
parent008cd5bbfb4763322837cd1f7c621f02ebe22fef (diff)
downloadlinux-4ff36718ede26ee2da73f2dae94d71e2b06845fc.tar.xz
[SCSI] Improve inquiry printing
- Replace scsi_device_types array API with scsi_device_type function API. Gets rid of a lot of common code, as well as being easier to use. - Add the new device types in SPC4 r05a, and rename some of the older ones. - Reformat the printing of inquiry data; now fits on one line and includes PQ. I think I've addressed all the feedback from the previous versions. My current test box prints: scsi 2:0:1:0: Direct access HP 18.2G ATLAS10K3_18_SCA HP05 PQ: 0 ANSI: 2 Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/scsi_proc.c')
-rw-r--r--drivers/scsi/scsi_proc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c
index 55200e4..524a5f7 100644
--- a/drivers/scsi/scsi_proc.c
+++ b/drivers/scsi/scsi_proc.c
@@ -178,9 +178,7 @@ static int proc_print_scsidevice(struct device *dev, void *data)
seq_printf(s, "\n");
- seq_printf(s, " Type: %s ",
- sdev->type < MAX_SCSI_DEVICE_CODE ?
- scsi_device_types[(int) sdev->type] : "Unknown ");
+ 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);