From b95752ad206222dfaa854a01c6106c89d2c607a2 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 24 Sep 2020 09:56:03 +0200 Subject: [PATCH] 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 --- misc-utils/lsblk-properties.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc-utils/lsblk-properties.c b/misc-utils/lsblk-properties.c index b8aa68184..19401715f 100644 --- a/misc-utils/lsblk-properties.c +++ b/misc-utils/lsblk-properties.c @@ -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)) ;