Top | ![]() |
![]() |
![]() |
![]() |
FuQuirks * | fu_quirks_new () |
gboolean | fu_quirks_load () |
const gchar * | fu_quirks_lookup_by_id () |
void | fu_quirks_add_value () |
gboolean | fu_quirks_get_kvs_for_guid () |
#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_COUNTERPART_GUID |
#define | FU_QUIRKS_PARENT_GUID |
#define | FU_QUIRKS_CHILDREN |
#define | FU_QUIRKS_VERSION |
#define | FU_QUIRKS_VENDOR |
#define | FU_QUIRKS_VENDOR_ID |
#define | FU_QUIRKS_FIRMWARE_SIZE_MIN |
#define | FU_QUIRKS_FIRMWARE_SIZE_MAX |
#define | FU_QUIRKS_FIRMWARE_SIZE |
#define | FU_QUIRKS_INSTALL_DURATION |
#define | FU_QUIRKS_VERSION_FORMAT |
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
void fu_quirks_add_value (FuQuirks *self
,const gchar *group
,const gchar *key
,const gchar *value
);
Adds a value to the quirk database. Normally this is achieved by loading a
quirk file using fu_quirks_load()
.
[skip]
self |
A FuQuirks |
|
group |
group, e.g. |
|
key |
group, e.g. |
|
value |
group, e.g. |
Since: 1.1.2
gboolean fu_quirks_get_kvs_for_guid (FuQuirks *self
,const gchar *guid
,GHashTableIter *iter
);
Looks up all entries in the hardware database using a GUID value.
self |
A FuPlugin |
|
guid |
a GUID |
|
iter |
A GHashTableIter, typically allocated on the stack by the caller |
Since: 1.1.2