From 4d7ef267ccc7675c319d04179c3c2a9396af1e93 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 25 May 2016 16:11:51 +0200 Subject: [PATCH] lsblk: use ID_WWN_WITH_EXTENSION is possible Addresses: https://github.com/karelzak/util-linux/issues/321 Signed-off-by: Karel Zak --- misc-utils/lsblk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index 0e76f43268..5b239f183f 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -547,8 +547,13 @@ static int get_udev_properties(struct blkdev_cxt *cxt) cxt->partuuid = xstrdup(data); if ((data = udev_device_get_property_value(dev, "ID_PART_ENTRY_FLAGS"))) cxt->partflags = xstrdup(data); - if ((data = udev_device_get_property_value(dev, "ID_WWN"))) + + data = udev_device_get_property_value(dev, "ID_WWN_WITH_EXTENSION"); + if (!data) + data = udev_device_get_property_value(dev, "ID_WWN"); + if (data) cxt->wwn = xstrdup(data); + if ((data = udev_device_get_property_value(dev, "ID_SERIAL_SHORT"))) cxt->serial = xstrdup(data); udev_device_unref(dev); -- 2.47.3