]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsblk: use ID_WWN_WITH_EXTENSION is possible
authorKarel Zak <kzak@redhat.com>
Wed, 25 May 2016 14:11:51 +0000 (16:11 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 25 May 2016 14:11:51 +0000 (16:11 +0200)
Addresses: https://github.com/karelzak/util-linux/issues/321
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsblk.c

index 0e76f43268fa3c56d97747dac0fde8a4d57d40b4..5b239f183feb662d78337eee0533e76e4cf43392 100644 (file)
@@ -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);