uefi: Rename all intermediary files and UEFI variables to prefix fwupd

fwupdate prefix is used by fwupdate and this will prevent clashes in case
its used instead.
This commit is contained in:
Mario Limonciello 2018-07-06 10:20:53 -05:00 committed by Mario Limonciello
parent 14fad85164
commit fd65ddda8a
5 changed files with 7 additions and 7 deletions

View File

@ -183,7 +183,7 @@ fu_plugin_uefi_write_splash_data (FuPlugin *plugin, GBytes *blob, GError **error
/* save to a predicatable filename */ /* save to a predicatable filename */
directory = fu_uefi_get_esp_path_for_os (data->esp_path); directory = fu_uefi_get_esp_path_for_os (data->esp_path);
basename = g_strdup_printf ("fwupdate-%s.cap", FU_UEFI_VARS_GUID_UX_CAPSULE); basename = g_strdup_printf ("fwupd-%s.cap", FU_UEFI_VARS_GUID_UX_CAPSULE);
fn = g_build_filename (directory, "fw", basename, NULL); fn = g_build_filename (directory, "fw", basename, NULL);
if (!fu_common_mkdir_parent (fn, error)) if (!fu_common_mkdir_parent (fn, error))
return FALSE; return FALSE;
@ -530,7 +530,7 @@ fu_plugin_uefi_delete_old_capsules (FuPlugin *plugin, GError **error)
files = fu_common_get_files_recursive (data->esp_path, error); files = fu_common_get_files_recursive (data->esp_path, error);
if (files == NULL) if (files == NULL)
return FALSE; return FALSE;
pattern = g_build_filename (data->esp_path, "EFI/*/fw/fwupdate-*.cap", NULL); pattern = g_build_filename (data->esp_path, "EFI/*/fw/fwupd-*.cap", NULL);
for (guint i = 0; i < files->len; i++) { for (guint i = 0; i < files->len; i++) {
const gchar *fn = g_ptr_array_index (files, i); const gchar *fn = g_ptr_array_index (files, i);
if (fnmatch (pattern, fn, 0) == 0) { if (fnmatch (pattern, fn, 0) == 0) {
@ -595,7 +595,7 @@ fu_plugin_startup (FuPlugin *plugin, GError **error)
} else { } else {
if (!fu_plugin_uefi_delete_old_capsules (plugin, error)) if (!fu_plugin_uefi_delete_old_capsules (plugin, error))
return FALSE; return FALSE;
if (!fu_uefi_vars_delete_with_glob (FU_UEFI_VARS_GUID_FWUPDATE, "fwupdate-*", error)) if (!fu_uefi_vars_delete_with_glob (FU_UEFI_VARS_GUID_FWUPDATE, "fwupd-*", error))
return FALSE; return FALSE;
} }

View File

@ -235,7 +235,7 @@ fu_uefi_update_info_func (void)
g_assert_cmpint (fu_uefi_update_info_get_hw_inst (info), ==, 0x0); g_assert_cmpint (fu_uefi_update_info_get_hw_inst (info), ==, 0x0);
g_assert_cmpint (fu_uefi_update_info_get_status (info), ==, FU_UEFI_UPDATE_INFO_STATUS_ATTEMPT_UPDATE); g_assert_cmpint (fu_uefi_update_info_get_status (info), ==, FU_UEFI_UPDATE_INFO_STATUS_ATTEMPT_UPDATE);
g_assert_cmpstr (fu_uefi_update_info_get_capsule_fn (info), ==, g_assert_cmpstr (fu_uefi_update_info_get_capsule_fn (info), ==,
"/EFI/fedora/fw/fwupdate-697bd920-12cf-4da9-8385-996909bc6559.cap"); "/EFI/fedora/fw/fwupd-697bd920-12cf-4da9-8385-996909bc6559.cap");
} }
int int

View File

@ -164,7 +164,7 @@ fu_uefi_device_get_guid (FuUefiDevice *self)
static gchar * static gchar *
fu_uefi_device_build_varname (FuUefiDevice *self) fu_uefi_device_build_varname (FuUefiDevice *self)
{ {
return g_strdup_printf ("fwupdate-%s-%"G_GUINT64_FORMAT, return g_strdup_printf ("fwupd-%s-%"G_GUINT64_FORMAT,
self->fw_class, self->fw_class,
self->fmp_hardware_instance); self->fmp_hardware_instance);
} }
@ -310,7 +310,7 @@ fu_uefi_device_write_firmware (FuDevice *device, GBytes *fw, GError **error)
/* save the blob to the ESP */ /* save the blob to the ESP */
directory = fu_uefi_get_esp_path_for_os (esp_path); directory = fu_uefi_get_esp_path_for_os (esp_path);
basename = g_strdup_printf ("fwupdate-%s.cap", self->fw_class); basename = g_strdup_printf ("fwupd-%s.cap", self->fw_class);
fn = g_build_filename (directory, "fw", basename, NULL); fn = g_build_filename (directory, "fw", basename, NULL);
if (!fu_common_mkdir_parent (fn, error)) if (!fu_common_mkdir_parent (fn, error))
return FALSE; return FALSE;

View File

@ -1,2 +1,2 @@
EFI EFI
efi/efivars/fwupdate-c34cb672-a81e-5d32-9d89-cbcabe8ec37b-0-0abba7dc-e516-4167-bbf5-4d9d1c739416 efi/efivars/fwupd-c34cb672-a81e-5d32-9d89-cbcabe8ec37b-0-0abba7dc-e516-4167-bbf5-4d9d1c739416