diff --git a/libfwupd/fwupd-enums.c b/libfwupd/fwupd-enums.c index 7638cc4c1..c0ac0e6e3 100644 --- a/libfwupd/fwupd-enums.c +++ b/libfwupd/fwupd-enums.c @@ -201,6 +201,8 @@ fwupd_device_flag_to_string(FwupdDeviceFlags device_flag) return "unreachable"; if (device_flag == FWUPD_DEVICE_FLAG_AFFECTS_FDE) return "affects-fde"; + if (device_flag == FWUPD_DEVICE_FLAG_END_OF_LIFE) + return "end-of-life"; if (device_flag == FWUPD_DEVICE_FLAG_UNKNOWN) return "unknown"; return NULL; @@ -312,6 +314,8 @@ fwupd_device_flag_from_string(const gchar *device_flag) return FWUPD_DEVICE_FLAG_UNREACHABLE; if (g_strcmp0(device_flag, "affects-fde") == 0) return FWUPD_DEVICE_FLAG_AFFECTS_FDE; + if (g_strcmp0(device_flag, "end-of-life") == 0) + return FWUPD_DEVICE_FLAG_END_OF_LIFE; return FWUPD_DEVICE_FLAG_UNKNOWN; } diff --git a/libfwupd/fwupd-enums.h b/libfwupd/fwupd-enums.h index 2afac82a5..fa3b0ab36 100644 --- a/libfwupd/fwupd-enums.h +++ b/libfwupd/fwupd-enums.h @@ -495,6 +495,15 @@ typedef enum { * Since: 1.7.1 */ #define FWUPD_DEVICE_FLAG_AFFECTS_FDE (1llu << 45) +/** + * FWUPD_DEVICE_FLAG_END_OF_LIFE: + * + * The device is no longer supported by the original hardware vendor as it is considered + * end-of-life. It it unlikely to receive firmware updates, even for security issues. + * + * Since: 1.7.5 + */ +#define FWUPD_DEVICE_FLAG_END_OF_LIFE (1llu << 46) /** * FWUPD_DEVICE_FLAG_UNKNOWN: * diff --git a/src/fu-engine.c b/src/fu-engine.c index 21a8a1d4a..97fc8aaea 100644 --- a/src/fu-engine.c +++ b/src/fu-engine.c @@ -762,6 +762,8 @@ fu_engine_set_release_from_appstream(FuEngine *self, fwupd_release_set_update_image(rel, tmp); } } + if (xb_node_get_attr(release, "date_eol") != NULL) + fu_device_add_flag(dev, FWUPD_DEVICE_FLAG_END_OF_LIFE); /* sort the locations by scheme */ g_ptr_array_sort_with_data(fwupd_release_get_locations(rel), diff --git a/src/fu-util-common.c b/src/fu-util-common.c index 8c4eef7d4..24c6984e2 100644 --- a/src/fu-util-common.c +++ b/src/fu-util-common.c @@ -1238,6 +1238,10 @@ fu_util_device_flag_to_string(guint64 device_flag) /* TRANSLATORS: we might ask the user the recovery key when next booting Windows */ return _("Full disk encryption secrets may be invalidated when updating"); } + if (device_flag == FWUPD_DEVICE_FLAG_END_OF_LIFE) { + /* TRANSLATORS: the vendor is no longer supporting the device */ + return _("End of life"); + } if (device_flag == FWUPD_DEVICE_FLAG_SKIPS_RESTART) { /* skip */ return NULL;