Skip to content

Commit

Permalink
scsi_id: Fixup prefix for pre-SPC inquiry reply
Browse files Browse the repository at this point in the history
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 <[email protected]>

systemd-commit: c0373eb019db70017878ee64d042de902e4c98ee
Author: Hannes Reinecke <[email protected]>
Date:   Wed Sep 13 09:08:28 2017 +0200
  • Loading branch information
bbonev committed Oct 10, 2021
1 parent 9da0df4 commit 21b7ede
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scsi_id/scsi_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ static int check_fill_0x83_prespc3(struct udev *udev,
*id_search, char *serial, char *serial_short, int max_len) {
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; */

Expand Down Expand Up @@ -713,7 +713,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.
*/
Expand Down

0 comments on commit 21b7ede

Please sign in to comment.