--- plugins/uefi/fu-plugin-uefi.c.orig 2019-09-20 11:51:02.880086918 +0000 +++ plugins/uefi/fu-plugin-uefi.c 2019-09-20 12:04:08.246754209 +0000 @@ -800,7 +800,7 @@ } static gboolean -fu_plugin_uefi_create_dummy (FuPlugin *plugin, GError **error) +fu_plugin_uefi_create_dummy (FuPlugin *plugin, const gchar *reason, GError **error) { const gchar *key; g_autoptr(FuDevice) dev = fu_device_new (); @@ -813,8 +813,7 @@ key = fu_plugin_get_dmi_value (plugin, FU_HWIDS_KEY_BIOS_VERSION); if (key != NULL) fu_device_set_version (dev, key, FWUPD_VERSION_FORMAT_PLAIN); - key = "Firmware can not be updated in legacy mode, switch to UEFI mode."; - fu_device_set_update_error (dev, key); + fu_device_set_update_error (dev, reason); fu_device_add_flag (dev, FWUPD_DEVICE_FLAG_INTERNAL); fu_device_add_flag (dev, FWUPD_DEVICE_FLAG_NEEDS_REBOOT); @@ -847,16 +846,20 @@ /* are the EFI dirs set up so we can update each device */ if (!fu_uefi_vars_supported (&error_local)) { + const gchar *reason = "Firmware can not be updated in legacy mode, switch to UEFI mode"; g_warning ("%s", error_local->message); - return fu_plugin_uefi_create_dummy (plugin, error); + return fu_plugin_uefi_create_dummy (plugin, reason, error); } /* get the directory of ESRT entries */ sysfsfwdir = fu_common_get_path (FU_PATH_KIND_SYSFSDIR_FW); esrt_path = g_build_filename (sysfsfwdir, "efi", "esrt", NULL); - entries = fu_uefi_get_esrt_entry_paths (esrt_path, error); - if (entries == NULL) - return FALSE; + entries = fu_uefi_get_esrt_entry_paths (esrt_path, &error_local); + if (entries == NULL) { + const gchar *reason = "UEFI Capsule updates not available or enabled"; + g_warning ("%s", error_local->message); + return fu_plugin_uefi_create_dummy (plugin, reason, error); + } /* make sure that efivarfs is rw */ if (!fu_plugin_uefi_ensure_efivarfs_rw (&error_efivarfs))