From d7c1523f58190936ed08d30389399a941994d148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Belley?= Date: Wed, 26 Aug 2020 13:42:09 +0200 Subject: hw/usb: Add U2F device autoscan to passthru mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds an autoscan to let u2f-passthru choose the first U2F device it finds. The autoscan is performed using libudev with an enumeration of all the hidraw devices present on the host. The first device which happens to be a U2F device is taken to do the passtru. Signed-off-by: César Belley Message-id: 20200826114209.28821-13-cesar.belley@lse.epita.fr Signed-off-by: Gerd Hoffmann --- hw/usb/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/usb/meson.build') diff --git a/hw/usb/meson.build b/hw/usb/meson.build index a25109b..b7c7ff2 100644 --- a/hw/usb/meson.build +++ b/hw/usb/meson.build @@ -52,7 +52,7 @@ endif # U2F softmmu_ss.add(when: 'CONFIG_USB_U2F', if_true: files('u2f.c')) -softmmu_ss.add(when: ['CONFIG_LINUX', 'CONFIG_USB_U2F'], if_true: files('u2f-passthru.c')) +softmmu_ss.add(when: ['CONFIG_LINUX', 'CONFIG_USB_U2F'], if_true: [libudev, files('u2f-passthru.c')]) if u2f.found() softmmu_ss.add(when: 'CONFIG_USB_U2F', if_true: [u2f, files('u2f-emulated.c')]) endif -- cgit v1.1