diff --git a/doc/spec/hal-spec-properties.xml b/doc/spec/hal-spec-properties.xml index a942513..eb9b268 100644 --- a/doc/spec/hal-spec-properties.xml +++ b/doc/spec/hal-spec-properties.xml @@ -3047,6 +3047,22 @@ org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'} No Name of the vendor per the USB ID Database + + + usb_device.dev_product (string) + + example: USB-PS/2 Optical Mouse + No + Name of the product supplied by the device + + + + usb_device.dev_vendor (string) + + example: Logitech + No + Name of the vendor supplied by the device + diff --git a/hald/freebsd/hf-usb.c b/hald/freebsd/hf-usb.c index d04f7f2..f1aa78b 100644 --- a/hald/freebsd/hf-usb.c +++ b/hald/freebsd/hf-usb.c @@ -378,6 +378,8 @@ hf_usb_device_new (HalDevice *parent, hal_device_property_set_string(device, "usb_device.product", di->udi_product); hal_device_property_set_string(device, "usb_device.vendor", di->udi_vendor); + hal_device_property_set_string(device, "usb_device.dev_product", di->udi_product); + hal_device_property_set_string(device, "usb_device.dev_vendor", di->udi_vendor); if (di->udi_config != 0 && hf_usb_get_descriptor(controller->fd, di->udi_addr, diff --git a/hald/linux/device.c b/hald/linux/device.c index 7917e03..996d354 100644 --- a/hald/linux/device.c +++ b/hald/linux/device.c @@ -3479,6 +3479,9 @@ usb_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de hal_util_set_int_from_file (d, "usb_device.device_subclass", sysfs_path, "bDeviceSubClass", 16); hal_util_set_int_from_file (d, "usb_device.device_protocol", sysfs_path, "bDeviceProtocol", 16); + hal_util_set_string_from_file (d, "usb_device.dev_vendor", sysfs_path, "manufacturer"); + hal_util_set_string_from_file (d, "usb_device.dev_product", sysfs_path, "product"); + hal_util_set_int_from_file (d, "usb_device.vendor_id", sysfs_path, "idVendor", 16); hal_util_set_int_from_file (d, "usb_device.product_id", sysfs_path, "idProduct", 16); diff --git a/hald/solaris/devinfo_usb.c b/hald/solaris/devinfo_usb.c index a933272..92675b9 100644 --- a/hald/solaris/devinfo_usb.c +++ b/hald/solaris/devinfo_usb.c @@ -70,6 +70,8 @@ devinfo_usb_add(HalDevice *parent, di_node_t node, char *devfs_path, char *devic PROP_STR(d, node, s, "usb-product-name", "info.product"); PROP_STR(d, node, s, "usb-product-name", "usb_device.product"); PROP_STR(d, node, s, "usb-vendor-name", "usb_device.vendor"); + PROP_STR(d, node, s, "usb-product-name", "usb_device.dev_product"); + PROP_STR(d, node, s, "usb-vendor-name", "usb_device.dev_vendor"); PROP_INT(d, node, i, "usb-vendor-id", "usb_device.vendor_id"); PROP_INT(d, node, i, "usb-product-id", "usb_device.product_id"); PROP_INT(d, node, i, "usb-revision-id", "usb_device.device_revision_bcd");