chiark / gitweb /
usb_id: fix typo
[elogind.git] / extras / usb_id / usb_id.c
index f4011ee8992b06dec55ed707d9d2a9fdc44976a2..720a0f5df7323e934813a21a5993ae9782917ec2 100644 (file)
@@ -316,11 +316,11 @@ static int usb_id(const char *target_path)
        /* usb device directory */
        usb_dev = sysfs_get_device_parent(interface_dev);
 
-       if (!strcmp(interface_dev->bus, "bus") != 0) {
+       if (strcmp(interface_dev->bus, "usb") != 0) {
                info("%s is not an usb device", target_path);
                return 1;
        }
-       
+
        if_class = sysfs_get_device_attr(interface_dev, "bInterfaceClass");
        if (!if_class) {
                info("%s: cannot get bInterfaceClass attribute", interface_dev->name);
@@ -485,6 +485,7 @@ int main(int argc, char **argv)
                                       vendor_str, model_str, serial_str);
                        }
                        printf("ID_TYPE=%s\n", type_str);
+                       printf("ID_BUS=usb\n");
                } else {
                        if (serial_str[0] == '\0') {
                                printf("%s_%s\n", 
@@ -497,6 +498,3 @@ int main(int argc, char **argv)
        }
        exit(retval);
 }
-
-
-