trivial: Load SMBIOS when using fwupdate to avoid a warning

This commit is contained in:
Richard Hughes 2021-09-28 08:17:44 +01:00
parent c598ad6434
commit f86c6add5f

View File

@ -276,6 +276,12 @@ main(int argc, char *argv[])
g_autoptr(FuBackend) backend = fu_uefi_backend_new(ctx);
g_autoptr(GError) error_local = NULL;
/* load SMBIOS */
if (!fu_context_load_hwinfo(ctx, &error_local)) {
g_printerr("failed: %s\n", error_local->message);
return EXIT_FAILURE;
}
/* add each device */
if (!fu_backend_coldplug(backend, &error_local)) {
g_printerr("failed: %s\n", error_local->message);
@ -392,6 +398,12 @@ main(int argc, char *argv[])
g_autoptr(GError) error_local = NULL;
g_autoptr(GBytes) fw = NULL;
/* load SMBIOS */
if (!fu_context_load_hwinfo(ctx, &error_local)) {
g_printerr("failed: %s\n", error_local->message);
return EXIT_FAILURE;
}
/* type is specified, otherwise use default */
if (type != NULL) {
if (g_strcmp0(type, "nvram") == 0) {