mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-12 12:48:10 +00:00
uefi: record boot variables to system log during updates (#152)
This doesn't strictly resolve the encountered issue, but it will aide in debugging these types of issues in the future.
This commit is contained in:
parent
b3dca14e90
commit
f043f1f94b
@ -182,6 +182,8 @@ fu_plugin_update_offline (FuPlugin *plugin,
|
|||||||
int rc;
|
int rc;
|
||||||
g_autoptr(fwup_resource_iter) iter = NULL;
|
g_autoptr(fwup_resource_iter) iter = NULL;
|
||||||
const gchar *str;
|
const gchar *str;
|
||||||
|
g_autofree gchar *efibootmgr_path = NULL;
|
||||||
|
g_autofree gchar *boot_variables = NULL;
|
||||||
|
|
||||||
/* get the hardware we're referencing */
|
/* get the hardware we're referencing */
|
||||||
fwup_resource_iter_create (&iter);
|
fwup_resource_iter_create (&iter);
|
||||||
@ -221,6 +223,16 @@ fu_plugin_update_offline (FuPlugin *plugin,
|
|||||||
filename, line, function, message, strerror(err));
|
filename, line, function, message, strerror(err));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* record boot information to system log for future debugging */
|
||||||
|
efibootmgr_path = g_find_program_in_path ("efibootmgr");
|
||||||
|
if (efibootmgr_path != NULL) {
|
||||||
|
if (!g_spawn_command_line_sync ("efibootmgr -v",
|
||||||
|
&boot_variables, NULL, NULL, error))
|
||||||
|
return FALSE;
|
||||||
|
g_message ("Boot Information:\n%s", boot_variables);
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user