Lines Matching defs:devpath
222 static int usb_id(const char *devpath)
233 dbg("devpath %s\n", devpath);
236 dev = sysfs_device_get(devpath);
238 err("unable to access '%s'", devpath);
245 info("unable to access usb_interface device of '%s'", devpath);
249 if_class = sysfs_attr_get_value(dev_interface->devpath, "bInterfaceClass");
256 if_subclass = sysfs_attr_get_value(dev_interface->devpath, "bInterfaceSubClass");
262 info("%s: if_class %d protocol %d\n", dev_interface->devpath, if_class_num, protocol);
267 info("unable to find parent 'usb' device of '%s'", devpath);
279 info("unable to find parent 'scsi' device of '%s'", devpath);
288 scsi_vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor");
295 scsi_model = sysfs_attr_get_value(dev_scsi->devpath, "model");
302 scsi_type = sysfs_attr_get_value(dev_scsi->devpath, "type");
309 scsi_rev = sysfs_attr_get_value(dev_scsi->devpath, "rev");
327 if (!(usb_vendor = sysfs_attr_get_value(dev_usb->devpath, "manufacturer")))
331 if (!(usb_vendor = sysfs_attr_get_value(dev_usb->devpath, "idVendor"))) {
341 if (!(usb_model = sysfs_attr_get_value(dev_usb->devpath, "product")))
345 if (!(usb_model = sysfs_attr_get_value(dev_usb->devpath, "idProduct")))
352 usb_rev = sysfs_attr_get_value(dev_usb->devpath, "bcdDevice");
358 usb_serial = sysfs_attr_get_value(dev_usb->devpath, "serial");
369 char devpath[MAX_PATH_LEN];
401 printf("Usage: usb_id [--usb-info] [--num-info] [--export] [--help] <devpath>\n"
414 strlcpy(devpath, env, sizeof(devpath));
421 strlcpy(devpath, argv[optind], sizeof(devpath));
424 retval = usb_id(devpath);