Top | ![]() |
![]() |
![]() |
![]() |
FuQuirks * | fu_quirks_new () |
gboolean | fu_quirks_load () |
const gchar * | fu_quirks_lookup_by_id () |
const gchar * | fu_quirks_lookup_by_usb_device () |
#define | FU_TYPE_QUIRKS |
#define | FU_QUIRKS_PLUGIN |
#define | FU_QUIRKS_UEFI_VERSION_FORMAT |
#define | FU_QUIRKS_DAEMON_VERSION_FORMAT |
#define | FU_QUIRKS_FLAGS |
#define | FU_QUIRKS_SUMMARY |
#define | FU_QUIRKS_ICON |
#define | FU_QUIRKS_NAME |
#define | FU_QUIRKS_GUID |
#define | FU_QUIRKS_VERSION |
#define | FU_QUIRKS_VENDOR |
FuQuirks |
Quirks can be used to modify device behaviour. When fwupd is installed in long-term support distros it's very hard to backport new versions as new hardware is released.
There are several reasons why we can't just include the mapping and quirk information in the AppStream metadata:
The extra data is hugely specific to the installed fwupd plugin versions
The device-id is per-device, and the mapping is usually per-plugin
Often the information is needed before the FuDevice is created
There are security implications in allowing plugins to handle new devices
The idea with quirks is that the end user can drop an additional (or replace an existing) file in a .d director with a simple format and the hardware will magically start working. This assumes no new quirks are required, as this would obviously need code changes, but allows us to get most existing devices working in an easy way without the user compiling anything.
gboolean fu_quirks_load (FuQuirks *self
,GError **error
);
Loads the various files that define the hardware quirks used in plugins.
[skip]
Since: 1.0.1
const gchar * fu_quirks_lookup_by_id (FuQuirks *self
,const gchar *group
,const gchar *key
);
Looks up an entry in the hardware database using a string value.
self |
A FuPlugin |
|
group |
A string group, e.g. "DeviceInstanceId=USB\VID_1235&PID_AB11" |
|
key |
An ID to match the entry, e.g. "Name" |
Since: 1.0.1
const gchar * fu_quirks_lookup_by_usb_device (FuQuirks *self
,GUsbDevice *usb_device
,const gchar *key
);
Looks up an entry in the hardware database using various keys generated
from usb_device
.
self |
A FuPlugin |
|
usb_device |
A GUsbDevice |
|
key |
A string group that matches the quirks file basename, e.g. "dfu-quirks" |
Since: 1.0.1
#define FU_QUIRKS_PLUGIN "Plugin"
Sets the plugin to use for a specific hardware device.
Since: 1.1.0
#define FU_QUIRKS_UEFI_VERSION_FORMAT "UefiVersionFormat"
Assigns the version format to use for a specific manufacturer. A specific version format is sometimes chosen to match the appearance of other systems or specifications.
Default value: use-triplet
Since: 1.0.1
#define FU_QUIRKS_DAEMON_VERSION_FORMAT "ComponentIDs"
Assigns the version format to use for a specific AppStream component. A specific version format is sometimes chosen to match the appearance of other systems or specifications.
Default value: use-triplet
key |
the optionally wildcarded AppStream ID e.g. |
|
value |
the version format, e.g. |
Since: 1.0.1
#define FU_QUIRKS_FLAGS "Flags"
Assigns optional quirks to use for a 8Bitdo device. The list of supported quirks is thus:
none
: No device quirks
is-bootloader
: Device is in bootloader mode
key |
the USB device ID, e.g. |
|
value |
the quirk, e.g. |
Since: 1.0.3
#define FU_QUIRKS_SUMMARY "Summary"
Sets a name for a specific hardware device.
key |
the USB device ID, e.g. |
|
value |
the USB device summary, e.g. |
Since: 1.0.2
#define FU_QUIRKS_ICON "Icon"
Adds an icon name for a specific hardware device.
key |
the USB device ID, e.g. |
|
value |
the USB device icon name, e.g. |
Since: 1.0.2
#define FU_QUIRKS_NAME "Name"
Sets a name for a specific hardware device.
key |
the USB device ID, e.g. |
|
value |
the USB device name, e.g. |
Since: 1.0.2
#define FU_QUIRKS_GUID "Guid"
Adds an extra GUID for a specific hardware device. If the value provided is not already a suitable GUID, it will be converted to one.
key |
the USB device ID, e.g. |
|
value |
the GUID, e.g. |
Since: 1.0.3
#define FU_QUIRKS_VERSION "Version"
Sets a version for a specific hardware device.
key |
the USB device ID, e.g. |
|
value |
the version number, e.g. |
Since: 1.0.3
#define FU_QUIRKS_VENDOR "Vendor"
Sets a vendor name for a specific hardware device.
key |
the USB device ID, e.g. |
|
value |
the vendor, e.g. |
Since: 1.0.3