libfwup(3) library to support management of system firmware updates

SYNOPSIS


#include <fwup.h>



int fwup_supported(void);
- test if firmware updating is supported on the running machine
typedef struct fwup_resource_s fwup_resource;
typedef struct fwup_resource_iter_s fwup_resource_iter;
int fwup_resource_iter_create(fwup_resource_iter **iter);
int fwup_resource_iter_next(fwup_resource_iter *iter,
fwup_resource **
re);
int fwup_resource_iter_destroy(fwup_resource_iter **iter);
- iterate the list of updateable firmware images
int fwup_set_up_update(fwup_resource *re, uint64_t hw_inst, int infd);
int fwup_clear_status(fwup_resource *re);
int fwup_get_guid(fwup_resource *re, efi_guid_t **guid);
int fwup_get_fw_version(fwup_resource *re, uint32_t *version);
int fwup_get_fw_type(fwup_resource *re, uint32_t *type);
int fwup_get_lowest_supported_fw_version(fwup_resource *re,
uint32_t *
version);
int fwup_get_last_attempt_info(fwup_resource *re, uint32_t *version,
uint32_t *
status, time_t *when);
- operate on an individual firmware entry

DESCRIPTION

int fwup_supported(void);
Tests if the current machine supports firmware updates
typedef struct fwup_resource_s fwup_resource;
typedef struct fwup_resource_iter_s fwup_resource_iter;
int fwup_resource_iter_create(fwup_resource_iter **iter);
Create a new firmware resoure iterator iter. int fwup_resource_iter_next(fwup_resource_iter *iter, fwup_resource **re);
Get the next firmware resource re from iterator iter. int fwup_resource_iter_destroy(fwup_resource_iter **iter);
Destroy firmware resource iterator iter. int fwup_set_up_update(fwup_resource *re, uint64_t hw_inst, int infd);
Set up an update for resource re, hardware instance number hw_inst, with the file referenced by the file descriptor infd. infd must support read(3). int fwup_clear_status(fwup_resource *re);
Clear the status of the firmware resource re. This removes any pending attempt to update it, as well as clearing any pending error report. int fwup_get_guid(fwup_resource *re, efi_guid_t **guid);
Set guid to the GUID which uniquely identifies firmware resource re. int fwup_get_fw_version(fwup_resource *re, uint32_t *version);
Set version to the version of the firmware resource re. #define FWUP_RESOURCE_TYPE_UNKNOWN 0 #define FWUP_RESOURCE_TYPE_SYSTEM_FIRMWARE 1 #define FWUP_RESOURCE_TYPE_DEVICE_FIRMWARE 2 #define FWUP_RESOURCE_TYPE_UEFI_DRIVER 3 int fwup_get_fw_type(fwup_resource *re, uint32_t *type);
Set type to the type of the firmware resource re. int fwup_get_lowest_supported_fw_version(fwup_resource *re, uint32_t *version); Set version to the lowest firmware version resource re can be updated to. int fwup_get_last_attempt_info(fwup_resource *re, uint32_t *version, uint32_t *status, time_t *when);
Get the status for the last attempt to update firmware resource re.

AUTHORS

Peter Jones <[email protected]>