mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-28 13:32:26 +00:00
Allow reading the PciBcrAddr quirk from flashrom devices
This commit is contained in:
parent
bc39faf4cf
commit
aa95f30390
@ -30,9 +30,29 @@ fu_flashrom_device_init (FuFlashromDevice *self)
|
||||
fu_device_add_icon (FU_DEVICE (self), "computer");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
fu_flashrom_device_set_quirk_kv (FuDevice *device,
|
||||
const gchar *key,
|
||||
const gchar *value,
|
||||
GError **error)
|
||||
{
|
||||
if (g_strcmp0 (key, "PciBcrAddr") == 0) {
|
||||
guint64 tmp = fu_common_strtoull (value);
|
||||
fu_device_set_metadata_integer (device, "PciBcrAddr", tmp);
|
||||
return TRUE;
|
||||
}
|
||||
g_set_error_literal (error,
|
||||
G_IO_ERROR,
|
||||
G_IO_ERROR_NOT_SUPPORTED,
|
||||
"no supported");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
fu_flashrom_device_class_init (FuFlashromDeviceClass *klass)
|
||||
{
|
||||
FuDeviceClass *klass_device = FU_DEVICE_CLASS (klass);
|
||||
klass_device->set_quirk_kv = fu_flashrom_device_set_quirk_kv;
|
||||
}
|
||||
|
||||
FuDevice *
|
||||
|
Loading…
Reference in New Issue
Block a user