diff options
author | Karel Zak <kzak@redhat.com> | 2020-09-23 15:41:05 +0200 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2020-11-13 12:03:24 +0100 |
commit | 392c4d91313e2fb24daeffdb354999b00864d2bb (patch) | |
tree | 6b2112fc0c9e486bc2cda7b84b85a29a2fd1f358 | |
parent | 834378f32b52c67bd027773a8ebab60b49cd71d8 (diff) | |
download | util-linux-392c4d91313e2fb24daeffdb354999b00864d2bb.tar.gz |
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 <kzak@redhat.com>
-rw-r--r-- | misc-utils/lsblk-properties.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/misc-utils/lsblk-properties.c b/misc-utils/lsblk-properties.c index 9e79be353..b8aa68184 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)) ; |