mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-06 09:00:55 +00:00
uefi: Allow devices to create more complete fake UEFI devices
Also, gets rid of two 'TODO' warnings with LGTM.
This commit is contained in:
parent
8cfbb25c31
commit
20f14c29cb
@ -619,8 +619,8 @@ fu_uefi_device_new_from_dev (FuDevice *dev)
|
||||
self->fw_class = g_strdup (fu_device_get_guid_default (dev));
|
||||
tmp = fu_device_get_metadata (dev, FU_DEVICE_METADATA_UEFI_DEVICE_KIND);
|
||||
self->kind = fu_uefi_device_kind_from_string (tmp);
|
||||
self->capsule_flags = 0; /* FIXME? */
|
||||
self->fw_version = 0; /* FIXME? */
|
||||
self->capsule_flags = fu_device_get_metadata_integer (dev, FU_DEVICE_METADATA_UEFI_CAPSULE_FLAGS);
|
||||
self->fw_version = fu_device_get_metadata_integer (dev, FU_DEVICE_METADATA_UEFI_FW_VERSION);
|
||||
g_assert (self->fw_class != NULL);
|
||||
return self;
|
||||
}
|
||||
|
@ -45,4 +45,23 @@ G_BEGIN_DECLS
|
||||
*/
|
||||
#define FU_DEVICE_METADATA_UEFI_DEVICE_KIND "UefiDeviceKind"
|
||||
|
||||
/**
|
||||
* FU_DEVICE_METADATA_UEFI_FW_VERSION:
|
||||
*
|
||||
* The firmware version of the UEFI device specified as a 32 bit unsigned
|
||||
* integer.
|
||||
* Consumed by the uefi plugin when other devices register fake devices that
|
||||
* need to be handled as a capsule update.
|
||||
*/
|
||||
#define FU_DEVICE_METADATA_UEFI_FW_VERSION "UefiFwVersion"
|
||||
|
||||
/**
|
||||
* FU_DEVICE_METADATA_UEFI_CAPSULE_FLAGS:
|
||||
*
|
||||
* The capsule flags for the UEFI device, e.g. %EFI_CAPSULE_HEADER_FLAGS_PERSIST_ACROSS_RESET
|
||||
* Consumed by the uefi plugin when other devices register fake devices that
|
||||
* need to be handled as a capsule update.
|
||||
*/
|
||||
#define FU_DEVICE_METADATA_UEFI_CAPSULE_FLAGS "UefiCapsuleFlags"
|
||||
|
||||
G_END_DECLS
|
||||
|
Loading…
Reference in New Issue
Block a user