summaryrefslogtreecommitdiff
path: root/extras/usb_id
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-08-19 16:06:25 +0200
committerKay Sievers <kay.sievers@suse.de>2006-08-19 16:06:25 +0200
commit95776dc6ec174f47fa4dd4d8abf5d457223e5dd4 (patch)
treeff9f2e24f8333d460509c7fb987ce2ecb37605e1 /extras/usb_id
parenteef7c9a385575375a3e3310900022b37777aeb6c (diff)
consistent key naming to match only the event device or include all parent devices
This scheme is more consistent and makes it obvious if a match happens against the event device only, or the full chain of parent devices. The old key names are now: BUS -> SUBSYSTEMS ID -> KERNELS SYSFS -> ATTRS DRIVER -> DRIVERS Match keys for the event device: KERNEL SUBSYSTEM ATTR DRIVER (in a future release, for now the same as DRIVERS) Match keys for all devices along the parent device chain: KERNELS SUBSYSTEMS ATTRS DRIVERS ID, BUS, SYSFS are no longer mentioned in the man page but still work. DRIVER must be converted to DRIVERS to match the new scheme. For now, an error is logged, if DRIVER is used. In a future release, the DRIVER key behaviour will change.
Diffstat (limited to 'extras/usb_id')
-rw-r--r--extras/usb_id/usb_id.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/extras/usb_id/usb_id.c b/extras/usb_id/usb_id.c
index 85c6beda40..ba8bfdf8c5 100644
--- a/extras/usb_id/usb_id.c
+++ b/extras/usb_id/usb_id.c
@@ -255,7 +255,7 @@ static int usb_id(const char *devpath)
if_class = sysfs_attr_get_value(dev_interface->devpath, "bInterfaceClass");
if (!if_class) {
- info("%s: cannot get bInterfaceClass attribute", dev_interface->kernel_name);
+ info("%s: cannot get bInterfaceClass attribute", dev_interface->kernel);
return 1;
}
if_class_num = strtoul(if_class, NULL, 16);
@@ -289,28 +289,28 @@ static int usb_id(const char *devpath)
/* Generic SPC-2 device */
scsi_vendor = sysfs_attr_get_value(dev_scsi->devpath, "vendor");
if (!scsi_vendor) {
- info("%s: cannot get SCSI vendor attribute", dev_scsi->kernel_name);
+ info("%s: cannot get SCSI vendor attribute", dev_scsi->kernel);
goto fallback;
}
set_str(vendor_str, scsi_vendor, sizeof(vendor_str)-1);
scsi_model = sysfs_attr_get_value(dev_scsi->devpath, "model");
if (!scsi_model) {
- info("%s: cannot get SCSI model attribute", dev_scsi->kernel_name);
+ info("%s: cannot get SCSI model attribute", dev_scsi->kernel);
goto fallback;
}
set_str(model_str, scsi_model, sizeof(model_str)-1);
scsi_type = sysfs_attr_get_value(dev_scsi->devpath, "type");
if (!scsi_type) {
- info("%s: cannot get SCSI type attribute", dev_scsi->kernel_name);
+ info("%s: cannot get SCSI type attribute", dev_scsi->kernel);
goto fallback;
}
set_scsi_type(type_str, scsi_type, sizeof(type_str)-1);
scsi_rev = sysfs_attr_get_value(dev_scsi->devpath, "rev");
if (!scsi_rev) {
- info("%s: cannot get SCSI revision attribute", dev_scsi->kernel_name);
+ info("%s: cannot get SCSI revision attribute", dev_scsi->kernel);
goto fallback;
}
set_str(revision_str, scsi_rev, sizeof(revision_str)-1);