]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsblk: fix SCSI_IDENT_SERIAL
authorKarel Zak <kzak@redhat.com>
Thu, 24 Sep 2020 07:56:03 +0000 (09:56 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 13 Nov 2020 11:03:40 +0000 (12:03 +0100)
It seems sg3_utils does not use ID_ prefix like other udev stuff.

Addresses: https://github.com/karelzak/util-linux/issues/1143
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsblk-properties.c

index b8aa681845358004d22802cf373c1f651917ef56..19401715f864a6d71aa8788f887d9d36dc718340 100644 (file)
@@ -209,7 +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, "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)) ;