From 4bf53196fc1198a0688b49bcd16cd0126823f434 Mon Sep 17 00:00:00 2001 From: hugh712 Date: Tue, 5 Jul 2022 11:18:23 +0800 Subject: [PATCH] trivial: don't show devices with inhibit id: hidden dell-dock: don't show thunderbolt's usb4 device, if inhibited --- plugins/dell-dock/fu-plugin-dell-dock.c | 2 +- src/fu-device-list.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/dell-dock/fu-plugin-dell-dock.c b/plugins/dell-dock/fu-plugin-dell-dock.c index 80553277e..f09027821 100644 --- a/plugins/dell-dock/fu-plugin-dell-dock.c +++ b/plugins/dell-dock/fu-plugin-dell-dock.c @@ -255,7 +255,7 @@ fu_plugin_dell_dock_device_registered(FuPlugin *plugin, FuDevice *device) g_autofree gchar *msg = NULL; msg = g_strdup_printf("firmware update inhibited by [%s] plugin", fu_plugin_get_name(plugin)); - fu_device_inhibit(device, "usb4-blocked", msg); + fu_device_inhibit(device, "hidden", msg); return; } diff --git a/src/fu-device-list.c b/src/fu-device-list.c index 64ee70482..c8364e6f1 100644 --- a/src/fu-device-list.c +++ b/src/fu-device-list.c @@ -215,6 +215,8 @@ fu_device_list_get_active(FuDeviceList *self) FuDeviceItem *item = g_ptr_array_index(self->devices, i); if (fu_device_has_inhibit(item->device, "unconnected")) continue; + if (fu_device_has_inhibit(item->device, "hidden")) + continue; g_ptr_array_add(devices, g_object_ref(item->device)); } g_rw_lock_reader_unlock(&self->devices_mutex);