mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-16 20:15:11 +00:00
trivial: Export fu_device_set_quirk_kv() for future use
This seems like a useful thing regardless.
This commit is contained in:
parent
b0ccde5b27
commit
1d308b2361
@ -56,3 +56,5 @@ FuDeviceInternalFlags
|
|||||||
fu_device_get_internal_flags(FuDevice *self);
|
fu_device_get_internal_flags(FuDevice *self);
|
||||||
void
|
void
|
||||||
fu_device_set_internal_flags(FuDevice *self, FuDeviceInternalFlags flags);
|
fu_device_set_internal_flags(FuDevice *self, FuDeviceInternalFlags flags);
|
||||||
|
gboolean
|
||||||
|
fu_device_set_quirk_kv(FuDevice *self, const gchar *key, const gchar *value, GError **error);
|
||||||
|
@ -1619,13 +1619,31 @@ fu_device_set_quirk_inhibit_section(FuDevice *self, const gchar *value, GError *
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
/**
|
||||||
|
* fu_device_set_quirk_kv:
|
||||||
|
* @self: a #FuDevice
|
||||||
|
* @key: a string key
|
||||||
|
* @value: a string value
|
||||||
|
* @error: (nullable): optional return location for an error
|
||||||
|
*
|
||||||
|
* Sets a specific quirk on the device.
|
||||||
|
*
|
||||||
|
* Returns: %TRUE on success
|
||||||
|
*
|
||||||
|
* Since: 1.8.5
|
||||||
|
**/
|
||||||
|
gboolean
|
||||||
fu_device_set_quirk_kv(FuDevice *self, const gchar *key, const gchar *value, GError **error)
|
fu_device_set_quirk_kv(FuDevice *self, const gchar *key, const gchar *value, GError **error)
|
||||||
{
|
{
|
||||||
FuDevicePrivate *priv = GET_PRIVATE(self);
|
FuDevicePrivate *priv = GET_PRIVATE(self);
|
||||||
FuDeviceClass *klass = FU_DEVICE_GET_CLASS(self);
|
FuDeviceClass *klass = FU_DEVICE_GET_CLASS(self);
|
||||||
guint64 tmp;
|
guint64 tmp;
|
||||||
|
|
||||||
|
g_return_val_if_fail(FU_IS_DEVICE(self), FALSE);
|
||||||
|
g_return_val_if_fail(key != NULL, FALSE);
|
||||||
|
g_return_val_if_fail(value != NULL, FALSE);
|
||||||
|
g_return_val_if_fail(error == NULL || *error == NULL, FALSE);
|
||||||
|
|
||||||
if (g_strcmp0(key, FU_QUIRKS_PLUGIN) == 0) {
|
if (g_strcmp0(key, FU_QUIRKS_PLUGIN) == 0) {
|
||||||
g_auto(GStrv) sections = g_strsplit(value, ",", -1);
|
g_auto(GStrv) sections = g_strsplit(value, ",", -1);
|
||||||
for (guint i = 0; sections[i] != NULL; i++)
|
for (guint i = 0; sections[i] != NULL; i++)
|
||||||
|
@ -1098,6 +1098,7 @@ LIBFWUPDPLUGIN_1.8.4 {
|
|||||||
|
|
||||||
LIBFWUPDPLUGIN_1.8.5 {
|
LIBFWUPDPLUGIN_1.8.5 {
|
||||||
global:
|
global:
|
||||||
|
fu_device_set_quirk_kv;
|
||||||
fu_intel_thunderbolt_firmware_get_type;
|
fu_intel_thunderbolt_firmware_get_type;
|
||||||
fu_intel_thunderbolt_firmware_new;
|
fu_intel_thunderbolt_firmware_new;
|
||||||
fu_intel_thunderbolt_nvm_get_device_id;
|
fu_intel_thunderbolt_nvm_get_device_id;
|
||||||
|
Loading…
Reference in New Issue
Block a user