lsblk: read SCSI_IDENT_SERIAL also from udev

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-12-14 11:38:04 +01:00
parent 72ab706502
commit 1492fb4ef2
1 changed files with 3 additions and 1 deletions

View File

@ -104,7 +104,9 @@ static struct lsblk_devprop *get_properties_by_udev(struct lsblk_device *ld)
if (data)
prop->wwn = xstrdup(data);
data = udev_device_get_property_value(dev, "ID_SCSI_SERIAL");
data = udev_device_get_property_value(dev, "SCSI_IDENT_SERIAL"); /* sg3_utils do not use I_D prefix */
if (!data)
data = udev_device_get_property_value(dev, "ID_SCSI_SERIAL");
if(!data)
data = udev_device_get_property_value(dev, "ID_SERIAL_SHORT");
if(!data)