From c2f6513c106f5522555a8c129f4e6579b9642c65 Mon Sep 17 00:00:00 2001 From: Sven Wiltink Date: Fri, 8 Feb 2019 10:53:21 +0100 Subject: lsblk: use ID_SCSI_SERIAL when available Signed-off-by: Karel Zak --- misc-utils/lsblk-properties.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'misc-utils') diff --git a/misc-utils/lsblk-properties.c b/misc-utils/lsblk-properties.c index 30168dd48..530332fec 100644 --- a/misc-utils/lsblk-properties.c +++ b/misc-utils/lsblk-properties.c @@ -96,8 +96,12 @@ static struct lsblk_devprop *get_properties_by_udev(struct lsblk_device *ld) if (data) prop->wwn = xstrdup(data); - if ((data = udev_device_get_property_value(dev, "ID_SERIAL_SHORT"))) + data = udev_device_get_property_value(dev, "ID_SCSI_SERIAL"); + if(!data) + data = udev_device_get_property_value(dev, "ID_SERIAL_SHORT"); + if (data) prop->serial = xstrdup(data); + if ((data = udev_device_get_property_value(dev, "ID_MODEL"))) prop->model = xstrdup(data); -- cgit v1.2.3-55-g7522