]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
scsi_id: Fixup prefix for pre-SPC inquiry reply
authorHannes Reinecke <hare@suse.de>
Wed, 13 Sep 2017 07:08:28 +0000 (09:08 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 19 Jun 2018 10:46:24 +0000 (12:46 +0200)
The prefix for EMC Symmetrix pre-SPC VPD inquiry reply
is always SCSI_ID_NAA, so we need to hardcode it to
avoid false values here.

Signed-off-by: Hannes Reinecke <hare@suse.com>
src/udev/scsi_id/scsi_serial.c

index 5e237fb25a168c05958e33d6d247bcbe033e5435..fd91657a324934424bd1c1e20e97cd7b5c0cad92 100644 (file)
@@ -578,7 +578,7 @@ static int check_fill_0x83_prespc3(struct udev *udev,
 {
         int i, j;
 
-        serial[0] = hex_str[id_search->id_type];
+        serial[0] = hex_str[SCSI_ID_NAA];
         /* serial has been memset to zero before */
         j = strlen(serial);        /* j = 1; */
 
@@ -726,7 +726,7 @@ static int do_scsi_page83_prespc3_inquiry(struct udev *udev,
         if (page_83[6] == 0)
                 return 2;
 
-        serial[0] = hex_str[id_search_list[0].id_type];
+        serial[0] = hex_str[SCSI_ID_NAA];
         /*
          * The first four bytes contain data, not a descriptor.
          */