mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-05 15:55:45 +00:00
Add a quirk for setting the USB device vendor
This commit is contained in:
parent
168b9faa80
commit
725c19fa88
@ -365,6 +365,13 @@ fu_plugin_device_add (FuPlugin *plugin, FuDevice *device)
|
||||
if (tmp != NULL)
|
||||
fu_device_set_summary (device, tmp);
|
||||
|
||||
/* vendor */
|
||||
tmp = fu_quirks_lookup_by_usb_device (priv->quirks,
|
||||
FU_QUIRKS_USB_VENDOR,
|
||||
usb_device);
|
||||
if (tmp != NULL)
|
||||
fu_device_set_vendor (device, tmp);
|
||||
|
||||
/* icon */
|
||||
tmp = fu_quirks_lookup_by_usb_device (priv->quirks,
|
||||
FU_QUIRKS_USB_ICON,
|
||||
|
@ -190,6 +190,17 @@ const gchar *fu_quirks_lookup_by_usb_device (FuQuirks *self,
|
||||
*/
|
||||
#define FU_QUIRKS_USB_GUID "fwupd-usb-guid"
|
||||
|
||||
/**
|
||||
* FU_QUIRKS_USB_VENDOR:
|
||||
* @key: the USB device ID, e.g. `USB\VID_0763&PID_2806`
|
||||
* @value: the vendor, e.g. `Hughski Limited`
|
||||
*
|
||||
* Sets a vendor name for a specific hardware device.
|
||||
*
|
||||
* Since: 1.0.3
|
||||
*/
|
||||
#define FU_QUIRKS_USB_VENDOR "fwupd-usb-vendor"
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __FU_QUIRKS_H */
|
||||
|
Loading…
Reference in New Issue
Block a user