mirror of
https://git.proxmox.com/git/fwupd
synced 2025-11-01 12:48:11 +00:00
Add FU_DEVICE_FLAG_NEEDS_BOOTLOADER
This commit is contained in:
parent
20003d1c88
commit
adb7a4979b
@ -114,6 +114,8 @@ fwupd_device_flag_to_string (FwupdDeviceFlags device_flag)
|
||||
return "locked";
|
||||
if (device_flag == FU_DEVICE_FLAG_SUPPORTED)
|
||||
return "supported";
|
||||
if (device_flag == FU_DEVICE_FLAG_NEEDS_BOOTLOADER)
|
||||
return "needs-bootloader";
|
||||
if (device_flag == FU_DEVICE_FLAG_UNKNOWN)
|
||||
return "unknown";
|
||||
return NULL;
|
||||
@ -146,6 +148,8 @@ fwupd_device_flag_from_string (const gchar *device_flag)
|
||||
return FU_DEVICE_FLAG_LOCKED;
|
||||
if (g_strcmp0 (device_flag, "supported") == 0)
|
||||
return FU_DEVICE_FLAG_SUPPORTED;
|
||||
if (g_strcmp0 (device_flag, "needs-bootloader") == 0)
|
||||
return FU_DEVICE_FLAG_NEEDS_BOOTLOADER;
|
||||
return FU_DEVICE_FLAG_UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
@ -81,6 +81,7 @@ typedef enum {
|
||||
* @FU_DEVICE_FLAG_REQUIRE_AC: Requires AC power
|
||||
* @FU_DEVICE_FLAG_LOCKED: Is locked and can be unlocked
|
||||
* @FU_DEVICE_FLAG_SUPPORTED: Is found in current metadata
|
||||
* @FU_DEVICE_FLAG_NEEDS_BOOTLOADER: Requires a bootloader mode
|
||||
*
|
||||
* FIXME: rename FU_DEVICE_ -> FWUPD_DEVICE_ when we break API
|
||||
*
|
||||
@ -93,6 +94,7 @@ typedef enum {
|
||||
#define FU_DEVICE_FLAG_REQUIRE_AC (1u << 3) /* Since: 0.6.3 */
|
||||
#define FU_DEVICE_FLAG_LOCKED (1u << 4) /* Since: 0.6.3 */
|
||||
#define FU_DEVICE_FLAG_SUPPORTED (1u << 5) /* Since: 0.7.1 */
|
||||
#define FU_DEVICE_FLAG_NEEDS_BOOTLOADER (1u << 6) /* Since: 0.7.3 */
|
||||
#define FU_DEVICE_FLAG_UNKNOWN G_MAXUINT64 /* Since: 0.7.3 */
|
||||
typedef guint64 FwupdDeviceFlags;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user