From: Hannes Reinecke Date: Wed, 13 Sep 2017 07:08:28 +0000 (+0200) Subject: scsi_id: Fixup prefix for pre-SPC inquiry reply X-Git-Tag: v239~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c0373eb019db70017878ee64d042de902e4c98ee;p=thirdparty%2Fsystemd.git scsi_id: Fixup prefix for pre-SPC inquiry reply 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 --- diff --git a/src/udev/scsi_id/scsi_serial.c b/src/udev/scsi_id/scsi_serial.c index 5e237fb25a1..fd91657a324 100644 --- a/src/udev/scsi_id/scsi_serial.c +++ b/src/udev/scsi_id/scsi_serial.c @@ -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. */