mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 13:59:15 +00:00
trivial: Provide FWUPD_PLUGIN_FLAG_AUTH_REQUIRED for future usage
This commit is contained in:
parent
4fb8c7ad51
commit
ef73701aa1
@ -341,6 +341,8 @@ fwupd_plugin_flag_to_string (FwupdPluginFlags plugin_flag)
|
||||
return "kernel-too-old";
|
||||
if (plugin_flag == FWUPD_DEVICE_FLAG_UNKNOWN)
|
||||
return "unknown";
|
||||
if (plugin_flag == FWUPD_PLUGIN_FLAG_AUTH_REQUIRED)
|
||||
return "auth-required";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -383,6 +385,8 @@ fwupd_plugin_flag_from_string (const gchar *plugin_flag)
|
||||
return FWUPD_PLUGIN_FLAG_REQUIRE_HWID;
|
||||
if (g_strcmp0 (plugin_flag, "kernel-too-old") == 0)
|
||||
return FWUPD_PLUGIN_FLAG_KERNEL_TOO_OLD;
|
||||
if (g_strcmp0 (plugin_flag, "auth-required") == 0)
|
||||
return FWUPD_PLUGIN_FLAG_AUTH_REQUIRED;
|
||||
return FWUPD_DEVICE_FLAG_UNKNOWN;
|
||||
}
|
||||
|
||||
|
@ -675,6 +675,15 @@ typedef enum {
|
||||
* Since: 1.6.2
|
||||
*/
|
||||
#define FWUPD_PLUGIN_FLAG_KERNEL_TOO_OLD (1u << 11)
|
||||
/**
|
||||
* FWUPD_PLUGIN_FLAG_AUTH_REQUIRED:
|
||||
*
|
||||
* The plugin requires the user to provide authentication details.
|
||||
* Supported clients will display this information to a user.
|
||||
*
|
||||
* Since: 1.6.2
|
||||
*/
|
||||
#define FWUPD_PLUGIN_FLAG_AUTH_REQUIRED (1u << 12)
|
||||
/**
|
||||
* FWUPD_PLUGIN_FLAG_UNKNOWN:
|
||||
*
|
||||
|
@ -383,6 +383,8 @@ fu_plugin_build_device_update_error (FuPlugin *self)
|
||||
return "Not updatable as UEFI capsule updates not enabled in firmware setup";
|
||||
if (fu_plugin_has_flag (self, FWUPD_PLUGIN_FLAG_UNLOCK_REQUIRED))
|
||||
return "Not updatable as requires unlock";
|
||||
if (fu_plugin_has_flag (self, FWUPD_PLUGIN_FLAG_AUTH_REQUIRED))
|
||||
return "Not updatable as requires authentication";
|
||||
if (fu_plugin_has_flag (self, FWUPD_PLUGIN_FLAG_EFIVAR_NOT_MOUNTED))
|
||||
return "Not updatable as efivarfs was not found";
|
||||
if (fu_plugin_has_flag (self, FWUPD_PLUGIN_FLAG_ESP_NOT_FOUND))
|
||||
|
@ -1447,6 +1447,10 @@ fu_util_plugin_flag_to_string (FwupdPluginFlags plugin_flag)
|
||||
/* TRANSLATORS: user needs to run a command */
|
||||
return _("Firmware updates disabled; run 'fwupdmgr unlock' to enable");
|
||||
}
|
||||
if (plugin_flag == FWUPD_PLUGIN_FLAG_AUTH_REQUIRED) {
|
||||
/* TRANSLATORS: user needs to run a command */
|
||||
return _("Authentication details are required");
|
||||
}
|
||||
if (plugin_flag == FWUPD_PLUGIN_FLAG_EFIVAR_NOT_MOUNTED) {
|
||||
/* TRANSLATORS: the user is using Gentoo/Arch and has screwed something up */
|
||||
return _("Required efivarfs filesystem was not found");
|
||||
@ -1487,6 +1491,7 @@ fu_util_plugin_flag_to_cli_text (FwupdPluginFlags plugin_flag)
|
||||
case FWUPD_PLUGIN_FLAG_LEGACY_BIOS:
|
||||
case FWUPD_PLUGIN_FLAG_CAPSULES_UNSUPPORTED:
|
||||
case FWUPD_PLUGIN_FLAG_UNLOCK_REQUIRED:
|
||||
case FWUPD_PLUGIN_FLAG_AUTH_REQUIRED:
|
||||
case FWUPD_PLUGIN_FLAG_EFIVAR_NOT_MOUNTED:
|
||||
case FWUPD_PLUGIN_FLAG_ESP_NOT_FOUND:
|
||||
case FWUPD_PLUGIN_FLAG_KERNEL_TOO_OLD:
|
||||
|
Loading…
Reference in New Issue
Block a user