mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-06 11:07:37 +00:00
redfish: Detect the HPE DeviceClass
DeviceClass in Oem/Hpe indicates the type of device in the HPE machine. In case SoftwareId is absent, we can use DeviceClass instead. Signed-off-by: Gary Lin <glin@suse.com>
This commit is contained in:
parent
ad594286b2
commit
3456238f0a
@ -89,8 +89,17 @@ fu_redfish_client_coldplug_member (FuRedfishClient *self,
|
||||
if (json_object_get_boolean_member (member, "Updateable"))
|
||||
fu_device_add_flag (dev, FWUPD_DEVICE_FLAG_UPDATABLE);
|
||||
}
|
||||
if (json_object_has_member (member, "SoftwareId"))
|
||||
if (json_object_has_member (member, "SoftwareId")) {
|
||||
fu_device_add_guid (dev, json_object_get_string_member (member, "SoftwareId"));
|
||||
} else if (json_object_has_member (member, "Oem")) {
|
||||
JsonObject *oem = json_object_get_object_member (member, "Oem");
|
||||
if (json_object_has_member (oem, "Hpe")) {
|
||||
JsonObject *hpe = json_object_get_object_member (oem, "Hpe");
|
||||
const gchar *dev_class = json_object_get_string_member (hpe, "DeviceClass");
|
||||
if (dev_class != NULL)
|
||||
fu_device_add_guid (dev, dev_class);
|
||||
}
|
||||
}
|
||||
|
||||
/* success */
|
||||
g_ptr_array_add (self->devices, g_steal_pointer (&dev));
|
||||
|
Loading…
Reference in New Issue
Block a user