mirror of
https://git.proxmox.com/git/fwupd
synced 2025-04-28 16:44:23 +00:00
Allow using requirements <firmware depth=0> with no parent
In this context a depth of 0 with no siblings means 'an only child' which in practice means 'the device itself'.
This commit is contained in:
parent
0378f9ffdb
commit
106de6f3fb
@ -1922,13 +1922,19 @@ fu_engine_check_requirement_firmware(FuEngine *self,
|
||||
FuDevice *child = NULL;
|
||||
FuDevice *parent = fu_device_get_parent(device_actual);
|
||||
GPtrArray *children;
|
||||
|
||||
/* no parent, so look for GUIDs on this device */
|
||||
if (parent == NULL) {
|
||||
g_set_error(error,
|
||||
FWUPD_ERROR,
|
||||
FWUPD_ERROR_NOT_SUPPORTED,
|
||||
"No parent specified for device %s",
|
||||
fu_device_get_name(device_actual));
|
||||
return FALSE;
|
||||
if (!fu_device_has_guids_any(device_actual, guids)) {
|
||||
g_set_error(error,
|
||||
FWUPD_ERROR,
|
||||
FWUPD_ERROR_NOT_SUPPORTED,
|
||||
"No GUID of %s on self device %s",
|
||||
xb_node_get_text(req),
|
||||
fu_device_get_name(device_actual));
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
children = fu_device_get_children(parent);
|
||||
for (guint i = 0; i < children->len; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user