diff options
author | Edward Goggin <egoggin@emc.com> | 2005-09-14 20:23:48 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2005-09-14 20:23:48 +0200 |
commit | 50be1401743704419ba52174302b4c1d06b3898b (patch) | |
tree | 93852844c79062fa6231cd1480687fdad0b75260 /extras/scsi_id/scsi_id.c | |
parent | 85701baede56edd4fba042f98550b8dec1a73127 (diff) |
scsi_id: derive a UID for a SCSI-2 not compliant with the page 83
This patch is to enable the use of scsi_id to derive a UID for a SCSI-2
device which is not compliant with the page 83 inquiry reply format for
either SPC-2 or SPC-3. In this case, the page 83 reply does not
contain a list of Identification descriptors but a single binary encoded
hexa-decimal Vendor Specified Identifier.
The update is being driven by the need for scsi_id to support older
model EMC Symmetrix hardware, that is, models 4, 5, and 6.
Diffstat (limited to 'extras/scsi_id/scsi_id.c')
-rw-r--r-- | extras/scsi_id/scsi_id.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c index a86b004709..e997be9956 100644 --- a/extras/scsi_id/scsi_id.c +++ b/extras/scsi_id/scsi_id.c @@ -67,7 +67,7 @@ static int dev_specified; static int sys_specified; static char config_file[MAX_NAME_LEN] = SCSI_ID_CONFIG_FILE; static int display_bus_id; -static int default_page_code; +static enum page_code default_page_code; static int use_stderr; static int debug; static int hotplug_mode; @@ -519,9 +519,11 @@ static int set_options(int argc, char **argv, const char *short_opts, case 'p': if (strcmp(optarg, "0x80") == 0) { - default_page_code = 0x80; + default_page_code = PAGE_80; } else if (strcmp(optarg, "0x83") == 0) { - default_page_code = 0x83; + default_page_code = PAGE_83; + } else if (strcmp(optarg, "pre-spc3-83") == 0) { + default_page_code = PAGE_83_PRE_SPC3; } else { log_message(LOG_WARNING, "Unknown page code '%s'\n", optarg); @@ -640,9 +642,11 @@ static int per_dev_options(struct sysfs_device *scsi_dev, int *good_bad, case 'p': if (strcmp(optarg, "0x80") == 0) { - *page_code = 0x80; + *page_code = PAGE_80; } else if (strcmp(optarg, "0x83") == 0) { - *page_code = 0x83; + *page_code = PAGE_83; + } else if (strcmp(optarg, "pre-spc3-83") == 0) { + *page_code = PAGE_83_PRE_SPC3; } else { log_message(LOG_WARNING, "Unknown page code '%s'\n", optarg); |