lsblk: fix SCSI_IDENT_SERIAL

It seems sg3_utils does not use ID_ prefix like other udev stuff.

Addresses: https://github.com/karelzak/util-linux/issues/1143
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2020-09-24 09:56:03 +02:00
parent 1e89f4fe18
commit b95752ad20
1 changed files with 1 additions and 1 deletions

View File

@ -209,7 +209,7 @@ static struct lsblk_devprop *get_properties_by_file(struct lsblk_device *ld)
else if (lookup(buf, "ID_MODEL", &prop->model)) ;
else if (lookup(buf, "ID_WWN_WITH_EXTENSION", &prop->wwn)) ;
else if (lookup(buf, "ID_WWN", &prop->wwn)) ;
else if (lookup(buf, "ID_SCSI_IDENT_SERIAL", &prop->serial)) ; /* serial from sg3_utils */
else if (lookup(buf, "SCSI_IDENT_SERIAL", &prop->serial)) ; /* serial from sg3_utils */
else if (lookup(buf, "ID_SCSI_SERIAL", &prop->serial)) ;
else if (lookup(buf, "ID_SERIAL_SHORT", &prop->serial)) ;
else if (lookup(buf, "ID_SERIAL", &prop->serial)) ;