From: Karel Zak Date: Thu, 24 Sep 2020 07:56:03 +0000 (+0200) Subject: lsblk: fix SCSI_IDENT_SERIAL X-Git-Tag: v2.36.1~48 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=1cf30a85af60b8b55b5edaa2e056b5871bf21a4a;p=thirdparty%2Futil-linux.git 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 --- diff --git a/misc-utils/lsblk-properties.c b/misc-utils/lsblk-properties.c index b8aa681845..19401715f8 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)) ;