[systemd-commits] src/udev
Zbigniew Jędrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Wed Apr 15 05:28:41 PDT 2015
src/udev/udev-builtin-usb_id.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 38b9855bfa28d1a7c8e0a629187147d79ffdaf6b
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Wed Apr 15 08:20:22 2015 -0400
udev-builtin-usb_id: fix inverted condition
Fix for 4beac74e69.
Thanks, Ronny!
diff --git a/src/udev/udev-builtin-usb_id.c b/src/udev/udev-builtin-usb_id.c
index 9418a6b..462efc5 100644
--- a/src/udev/udev-builtin-usb_id.c
+++ b/src/udev/udev-builtin-usb_id.c
@@ -430,10 +430,10 @@ fallback:
s = serial;
l = strpcpyl(&s, sizeof(serial), vendor_str, "_", model_str, NULL);
- if (isempty(serial_str))
+ if (!isempty(serial_str))
l = strpcpyl(&s, l, "_", serial_str, NULL);
- if (isempty(instance_str))
+ if (!isempty(instance_str))
strpcpyl(&s, l, "-", instance_str, NULL);
udev_builtin_add_property(dev, test, "ID_VENDOR", vendor_str);
@@ -444,14 +444,14 @@ fallback:
udev_builtin_add_property(dev, test, "ID_MODEL_ID", product_id);
udev_builtin_add_property(dev, test, "ID_REVISION", revision_str);
udev_builtin_add_property(dev, test, "ID_SERIAL", serial);
- if (isempty(serial_str))
+ if (!isempty(serial_str))
udev_builtin_add_property(dev, test, "ID_SERIAL_SHORT", serial_str);
- if (isempty(type_str))
+ if (!isempty(type_str))
udev_builtin_add_property(dev, test, "ID_TYPE", type_str);
- if (isempty(instance_str))
+ if (!isempty(instance_str))
udev_builtin_add_property(dev, test, "ID_INSTANCE", instance_str);
udev_builtin_add_property(dev, test, "ID_BUS", "usb");
- if (isempty(packed_if_str))
+ if (!isempty(packed_if_str))
udev_builtin_add_property(dev, test, "ID_USB_INTERFACES", packed_if_str);
if (ifnum != NULL)
udev_builtin_add_property(dev, test, "ID_USB_INTERFACE_NUM", ifnum);
More information about the systemd-commits
mailing list