Check whether smartcard is supported

This commit is contained in:
Liam 2023-12-29 16:16:09 -06:00 committed by Martin Wimpress
parent c9df8f3b32
commit 6216adf6a8
1 changed files with 5 additions and 2 deletions

View File

@ -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