diff --git a/libfwupd/fwupd-enums.c b/libfwupd/fwupd-enums.c index ef8ea03d1..c7a1f972d 100644 --- a/libfwupd/fwupd-enums.c +++ b/libfwupd/fwupd-enums.c @@ -193,6 +193,8 @@ fwupd_device_flag_to_string (FwupdDeviceFlags device_flag) return "add-counterpart-guids"; if (device_flag == FWUPD_DEVICE_FLAG_NO_GUID_MATCHING) return "no-guid-matching"; + if (device_flag == FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN) + return "updatable-hidden"; if (device_flag == FWUPD_DEVICE_FLAG_UNKNOWN) return "unknown"; return NULL; @@ -287,6 +289,8 @@ fwupd_device_flag_from_string (const gchar *device_flag) return FWUPD_DEVICE_FLAG_ADD_COUNTERPART_GUIDS; if (g_strcmp0 (device_flag, "no-guid-matching") == 0) return FWUPD_DEVICE_FLAG_NO_GUID_MATCHING; + if (g_strcmp0 (device_flag, "updatable-hidden") == 0) + return FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN; return FWUPD_DEVICE_FLAG_UNKNOWN; } diff --git a/libfwupd/fwupd-enums.h b/libfwupd/fwupd-enums.h index 6a7f2e3ba..e57b24cb7 100644 --- a/libfwupd/fwupd-enums.h +++ b/libfwupd/fwupd-enums.h @@ -104,6 +104,7 @@ typedef enum { * @FWUPD_DEVICE_FLAG_MD_SET_VERFMT: Set the device version format from the metadata if available * @FWUPD_DEVICE_FLAG_ADD_COUNTERPART_GUIDS: Add counterpart GUIDs from an alternate mode like bootloader * @FWUPD_DEVICE_FLAG_NO_GUID_MATCHING: Force an explicit ID match when adding devices to the device list + * @FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN: Device is updatable but should not be called by the client * * The device flags. **/ @@ -145,6 +146,7 @@ typedef enum { #define FWUPD_DEVICE_FLAG_MD_SET_VERFMT (1llu << 34) /* Since: 1.4.0 */ #define FWUPD_DEVICE_FLAG_ADD_COUNTERPART_GUIDS (1llu << 35) /* Since: 1.4.0 */ #define FWUPD_DEVICE_FLAG_NO_GUID_MATCHING (1llu << 36) /* Since: 1.4.1 */ +#define FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN (1llu << 37) /* Since: 1.4.1 */ #define FWUPD_DEVICE_FLAG_UNKNOWN G_MAXUINT64 /* Since: 0.7.3 */ typedef guint64 FwupdDeviceFlags; diff --git a/src/fu-install-task.c b/src/fu-install-task.c index f2cc597e7..ccab6bc57 100644 --- a/src/fu-install-task.c +++ b/src/fu-install-task.c @@ -276,7 +276,8 @@ fu_install_task_check_requirements (FuInstallTask *self, } /* no update abilities */ - if (!fu_device_has_flag (self->device, FWUPD_DEVICE_FLAG_UPDATABLE)) { + if (!fu_device_has_flag (self->device, FWUPD_DEVICE_FLAG_UPDATABLE) && + !fu_device_has_flag (self->device, FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN)) { g_set_error (error, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED, diff --git a/src/fu-util-common.c b/src/fu-util-common.c index 54e1b360c..1cd81f949 100644 --- a/src/fu-util-common.c +++ b/src/fu-util-common.c @@ -962,7 +962,8 @@ fu_util_device_flag_to_string (guint64 device_flag) /* TRANSLATORS: Device cannot be removed easily*/ return _("Internal device"); } - if (device_flag == FWUPD_DEVICE_FLAG_UPDATABLE) { + if (device_flag == FWUPD_DEVICE_FLAG_UPDATABLE || + device_flag == FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN) { /* TRANSLATORS: Device is updatable in this or any other mode */ return _("Updatable"); }