mirror of
https://git.proxmox.com/git/fwupd
synced 2025-05-26 02:42:46 +00:00
trivial: Load SMBIOS when using fwupdate to avoid a warning
This commit is contained in:
parent
c598ad6434
commit
f86c6add5f
@ -276,6 +276,12 @@ main(int argc, char *argv[])
|
|||||||
g_autoptr(FuBackend) backend = fu_uefi_backend_new(ctx);
|
g_autoptr(FuBackend) backend = fu_uefi_backend_new(ctx);
|
||||||
g_autoptr(GError) error_local = NULL;
|
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 */
|
/* add each device */
|
||||||
if (!fu_backend_coldplug(backend, &error_local)) {
|
if (!fu_backend_coldplug(backend, &error_local)) {
|
||||||
g_printerr("failed: %s\n", error_local->message);
|
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(GError) error_local = NULL;
|
||||||
g_autoptr(GBytes) fw = 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 */
|
/* type is specified, otherwise use default */
|
||||||
if (type != NULL) {
|
if (type != NULL) {
|
||||||
if (g_strcmp0(type, "nvram") == 0) {
|
if (g_strcmp0(type, "nvram") == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user