From a11fefff35a03eb8a154a0981f825fca7b959209 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Thu, 17 Mar 2022 13:13:35 +0000 Subject: [PATCH] redfish: Don't add the backup BMC device as it shares the same GUIDs This fixes the problem when the UEFI update depends on a specific BMC version -- including the backup BMC device means we checking that both the primary and the backup were above a specific version. I don't think it's ever useful to show the backup BMC device, so just don't include it as an enumerated device. Fixes https://github.com/fwupd/fwupd/issues/4404 --- plugins/redfish/fu-redfish-backend.c | 11 +++++++++-- plugins/redfish/redfish.quirk | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/redfish/fu-redfish-backend.c b/plugins/redfish/fu-redfish-backend.c index e8ae524bc..33fb63c61 100644 --- a/plugins/redfish/fu-redfish-backend.c +++ b/plugins/redfish/fu-redfish-backend.c @@ -92,6 +92,7 @@ fu_redfish_backend_coldplug_member(FuRedfishBackend *self, JsonObject *member, G { g_autoptr(FuDevice) dev = NULL; g_autoptr(FuDeviceLocker) locker = NULL; + g_autoptr(GError) error_local = NULL; /* create of the correct type */ dev = g_object_new(self->device_gtype, @@ -108,9 +109,15 @@ fu_redfish_backend_coldplug_member(FuRedfishBackend *self, JsonObject *member, G fu_device_add_private_flag(dev, FU_REDFISH_DEVICE_FLAG_WILDCARD_TARGETS); /* probe + setup */ - locker = fu_device_locker_new(dev, error); - if (locker == NULL) + locker = fu_device_locker_new(dev, &error_local); + if (locker == NULL) { + if (g_error_matches(error_local, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED)) { + g_debug("failed to setup: %s", error_local->message); + return TRUE; + } + g_propagate_error(error, g_steal_pointer(&error_local)); return FALSE; + } if (self->max_image_size != 0) fu_device_set_firmware_size_max(dev, (guint64)self->max_image_size); fu_backend_device_added(FU_BACKEND(self), dev); diff --git a/plugins/redfish/redfish.quirk b/plugins/redfish/redfish.quirk index 0322bd250..b96087d42 100644 --- a/plugins/redfish/redfish.quirk +++ b/plugins/redfish/redfish.quirk @@ -4,7 +4,7 @@ Flags = wildcard-targets,reset-required [REDFISH\VENDOR_Lenovo&ID_BMC-Backup] ParentGuid = REDFISH\VENDOR_Lenovo&ID_BMC-Primary -Flags = dual-image,is-backup +Flags = dual-image,is-backup,no-probe [REDFISH\VENDOR_Lenovo&ID_BMC-Primary] ParentGuid = REDFISH\VENDOR_Lenovo&ID_BMC-Primary