From 392c4d91313e2fb24daeffdb354999b00864d2bb Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 23 Sep 2020 15:41:05 +0200 Subject: [PATCH] lsblk: read ID_SCSI_IDENT_SERIAL if available This SERIAL comes from sg3_utils. Addresses: https://github.com/karelzak/util-linux/issues/1143 Signed-off-by: Karel Zak --- misc-utils/lsblk-properties.c | 1 + 1 file changed, 1 insertion(+) diff --git a/misc-utils/lsblk-properties.c b/misc-utils/lsblk-properties.c index 9e79be3533..b8aa681845 100644 --- a/misc-utils/lsblk-properties.c +++ b/misc-utils/lsblk-properties.c @@ -209,6 +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, "ID_SCSI_SERIAL", &prop->serial)) ; else if (lookup(buf, "ID_SERIAL_SHORT", &prop->serial)) ; else if (lookup(buf, "ID_SERIAL", &prop->serial)) ; -- 2.47.2