mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-15 13:59:15 +00:00
Show the device parent if there is an interesting child
Fixes https://github.com/fwupd/fwupd/issues/1671
This commit is contained in:
parent
30ef455d50
commit
95c7876346
@ -218,6 +218,18 @@ fu_util_print_tree (GNode *n, gpointer data)
|
|||||||
fu_util_traverse_tree, data);
|
fu_util_traverse_tree, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
fu_util_is_interesting_child (FwupdDevice *dev)
|
||||||
|
{
|
||||||
|
GPtrArray *children = fwupd_device_get_children (dev);
|
||||||
|
for (guint i = 0; i < children->len; i++) {
|
||||||
|
FwupdDevice *child = g_ptr_array_index (children, i);
|
||||||
|
if (fu_util_is_interesting_device (child))
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
fu_util_is_interesting_device (FwupdDevice *dev)
|
fu_util_is_interesting_device (FwupdDevice *dev)
|
||||||
{
|
{
|
||||||
@ -228,6 +240,8 @@ fu_util_is_interesting_device (FwupdDevice *dev)
|
|||||||
/* device not plugged in, get-details */
|
/* device not plugged in, get-details */
|
||||||
if (fwupd_device_get_flags (dev) == 0)
|
if (fwupd_device_get_flags (dev) == 0)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
if (fu_util_is_interesting_child (dev))
|
||||||
|
return TRUE;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user