static int export;
static int debug;
-static void set_str(char *to, const unsigned char *from, int count)
+static void set_str(char *to, const char *from, size_t count)
{
- int i, j;
- int len;
+ size_t i, j, len;
/* strip trailing whitespace */
len = strnlen(from, count);
/* 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);
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",