libfwup.h (3) Linux Manual Page
libfwup – library to support management of system firmware updates
Synopsis
#include <fwup.h>intfwup_supported(void);
- test if firmware updating is supported on the running machinetypedef struct fwup_resource_sfwup_resource;
typedef struct fwup_resource_iter_sfwup_resource_iter;
intfwup_resource_iter_create(fwup_resource_iter **iter);
intfwup_resource_iter_next(fwup_resource_iter *iter, fwup_resource **re);
intfwup_resource_iter_destroy(fwup_resource_iter **iter);
- iterate the list of updateable firmware imagesintfwup_set_guid(fwup_resource_iter *iter, fwup_resource **re, const efi_guid_t *guid);
- manually set a guid for updateintfwup_set_guid_forced(fwup_resource_iter *iter, fwup_resource **re, const efi_guid_t *guid, boolforce);
- manually set a guid for update (with a force option)voidfwup_resource_free(fwup_resource *re);
- free resource allocated by fwup_set_guid_forced()intfwup_set_up_update(fwup_resource *re, uint64_thw_inst, intinfd);
intfwup_clear_status(fwup_resource *re);
intfwup_get_guid(fwup_resource *re, efi_guid_t **guid);
intfwup_get_fw_version(fwup_resource *re, uint32_t *version);
intfwup_get_fw_type(fwup_resource *re, uint32_t *type);
intfwup_get_lowest_supported_fw_version(fwup_resource *re, uint32_t *version);
intfwup_get_last_attempt_info(fwup_resource *re, uint32_t *version, uint32_t *status, time_t *when);
- operate on an individual firmware entryintfwup_get_debug_log(char **utf8, size_t *size);
- show the debug log from the last update attemptvoidfwup_use_existing_media_path(intuse_existing_media_path);
- instruct fwupdate on whether to reuse old capsule filenames on the ESP.voidfwup_set_esp_mountpoint(char *path);
- Override detection of the mountpoint for the ESP directoryconst char *fwup_get_esp_mountpoint(void);
- Get the current mountpoint for the ESP directoryintfwup_get_ux_capsule_info(uint32_t *screen_x_size, uint32_t *screen_y_size);
- get the dimensions of the screen during boot
Description
intfwup_supported(void);Tests if the current machine supports firmware updatestypedef struct fwup_resource_sfwup_resource;
typedef struct fwup_resource_iter_sfwup_resource_iter;
intfwup_resource_iter_create(fwup_resource_iter **iter);
Create a new firmware resoure iterator iter.intfwup_resource_iter_next(fwup_resource_iter *iter, fwup_resource **re);
Get the next firmware resource re from iterator iter.intfwup_resource_iter_destroy(fwup_resource_iter **iter);
Destroy firmware resource iterator iter.intfwup_set_up_update(fwup_resource *re, uint64_thw_inst, intinfd);
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).intfwup_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.intfwup_get_guid(fwup_resource *re, efi_guid_t **guid);
Set guid to the GUID which uniquely identifies firmware resource re.intfwup_get_fw_version(fwup_resource *re, uint32_t *version);
Set version to the version of the firmware resource re. #defineFWUP_RESOURCE_TYPE_UNKNOWN0 #defineFWUP_RESOURCE_TYPE_SYSTEM_FIRMWARE1 #defineFWUP_RESOURCE_TYPE_DEVICE_FIRMWARE2 #defineFWUP_RESOURCE_TYPE_UEFI_DRIVER3intfwup_get_fw_type(fwup_resource *re, uint32_t *type);
Set type to the type of the firmware resource re.intfwup_get_lowest_supported_fw_version(fwup_resource *re, uint32_t *version);Set version to the lowest firmware version resource re can be updated to.intfwup_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.intfwup_get_debug_log(char **utf8, size_t *size);
Get the debug log from the last update attempt. This allocates a buffer which the caller must free.voidfwup_print_update_info(void);
Print the information of firmware update status.voidfwup_use_existing_media_path(intuse_existing_media_path);
Instruct fwupdate on whether to reuse old capsule filenames on the ESP.voidfwup_set_esp_mountpoint(char *path);
Override detection of the mountpoint for the ESP directory.intfwup_get_ux_capsule_info(uint32_t *screen_x_size, uint32_t *screen_y_size);
Get the dimensions of the screen during boot.
Authors
Peter Jones <pjones [at] redhat.com>
See Also
errno(3), strerror(3), strerror_r(3)
