From 74f95088e5f1580138d8cbc7a43394141a96b625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Figui=C3=A8re?= Date: Wed, 19 Jun 2024 22:44:19 -0400 Subject: [PATCH] usb: Change terminology for USB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Hubert Figuière --- src/xdp-app-info.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/xdp-app-info.c b/src/xdp-app-info.c index 798f3916f..28685125a 100644 --- a/src/xdp-app-info.c +++ b/src/xdp-app-info.c @@ -1845,40 +1845,40 @@ xdp_app_info_get_usb_queries (XdpAppInfo *app_info) { case XDP_APP_INFO_KIND_FLATPAK: { - g_auto(GStrv) allowed_devices = NULL; - g_auto(GStrv) blocked_devices = NULL; + g_auto(GStrv) enumerable_devices = NULL; + g_auto(GStrv) hidden_devices = NULL; - allowed_devices = g_key_file_get_string_list (app_info->u.flatpak.keyfile, + enumerable_devices = g_key_file_get_string_list (app_info->u.flatpak.keyfile, "USB Devices", "allowed-devices", NULL, NULL); - for (size_t i = 0; allowed_devices && allowed_devices[i] != NULL; i++) + for (size_t i = 0; enumerable_devices && enumerable_devices[i] != NULL; i++) { g_autoptr(XdpUsbQuery) query = - xdp_usb_query_from_string (XDP_USB_QUERY_TYPE_ALLOW, allowed_devices[i]); + xdp_usb_query_from_string (XDP_USB_QUERY_TYPE_ALLOW, enumerable_devices[i]); if (query) g_ptr_array_add (usb_queries, g_steal_pointer (&query)); } - blocked_devices = g_key_file_get_string_list (app_info->u.flatpak.keyfile, + hidden_devices = g_key_file_get_string_list (app_info->u.flatpak.keyfile, "USB Devices", "blocked-devices", NULL, NULL); - for (size_t i = 0; blocked_devices && blocked_devices[i] != NULL; i++) + for (size_t i = 0; hidden_devices && hidden_devices[i] != NULL; i++) { g_autoptr(XdpUsbQuery) query = - xdp_usb_query_from_string (XDP_USB_QUERY_TYPE_BLOCK, blocked_devices[i]); + xdp_usb_query_from_string (XDP_USB_QUERY_TYPE_BLOCK, hidden_devices[i]); if (query) g_ptr_array_add (usb_queries, g_steal_pointer (&query)); } - g_message ("Found %d allowlists and %d blocks for app %s", - allowed_devices ? g_strv_length (allowed_devices) : 0, - blocked_devices ? g_strv_length (blocked_devices) : 0, + g_message ("Found %d enumerable and %d hidden for app %s", + enumerable_devices ? g_strv_length (enumerable_devices) : 0, + hidden_devices ? g_strv_length (hidden_devices) : 0, xdp_app_info_get_id (app_info)); } break;