From 6216adf6a8ee04265b02460a49544a38a6ad46ae Mon Sep 17 00:00:00 2001 From: Liam <33645555+lj3954@users.noreply.github.com> Date: Fri, 29 Dec 2023 16:16:09 -0600 Subject: [PATCH] Check whether smartcard is supported --- quickemu | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/quickemu b/quickemu index fb129b5..577d65d 100755 --- a/quickemu +++ b/quickemu @@ -983,10 +983,13 @@ function vm_boot() { -device usb-redir,chardev=usbredirchardev3,id=usbredirdev3 -device pci-ohci,id=smartpass -device usb-ccid - -chardev spicevmc,id=ccid,name=smartcard - -device ccid-card-passthru,chardev=ccid ) + if "${QEMU}" -chardev spicevmc,id=ccid,name= 2>&1 | grep -q smartcard; then + args+=(-chardev spicevmc,id=ccid,name=smartcard + -device ccid-card-passthru,chardev=ccid) + fi + # setup usb-controller [ -z "${USB_CONTROLLER}" ] && USB_CONTROLLER="$usb_controller" if [ "${USB_CONTROLLER}" == "ehci" ]; then