mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-07 12:25:38 +00:00
dell: Fix plugin startup
The fu_context_get_smbios_data() call will not work when creating the plugin GType, so just create the SMI object when it is needed in ->startup(). Fixes https://github.com/fwupd/firmware-dell/issues/144
This commit is contained in:
parent
8eca325ae2
commit
749eb49852
@ -894,6 +894,7 @@ fu_dell_plugin_startup(FuPlugin *plugin, FuProgress *progress, GError **error)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self->smi_obj->smi = dell_smi_factory(DELL_SMI_DEFAULTS);
|
||||||
if (self->smi_obj->smi == NULL) {
|
if (self->smi_obj->smi == NULL) {
|
||||||
g_set_error(error,
|
g_set_error(error,
|
||||||
FWUPD_ERROR,
|
FWUPD_ERROR,
|
||||||
@ -955,8 +956,6 @@ fu_dell_plugin_constructed(GObject *obj)
|
|||||||
fu_context_add_runtime_version(ctx, "com.dell.libsmbios", tmp);
|
fu_context_add_runtime_version(ctx, "com.dell.libsmbios", tmp);
|
||||||
g_debug("Using libsmbios %s", tmp);
|
g_debug("Using libsmbios %s", tmp);
|
||||||
|
|
||||||
if (fu_dell_supported(plugin))
|
|
||||||
self->smi_obj->smi = dell_smi_factory(DELL_SMI_DEFAULTS);
|
|
||||||
self->smi_obj->fake_smbios = FALSE;
|
self->smi_obj->fake_smbios = FALSE;
|
||||||
if (g_getenv("FWUPD_DELL_FAKE_SMBIOS") != NULL)
|
if (g_getenv("FWUPD_DELL_FAKE_SMBIOS") != NULL)
|
||||||
self->smi_obj->fake_smbios = TRUE;
|
self->smi_obj->fake_smbios = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user