qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/usb: add configuration flags for emulated and passthru us


From: Paolo Bonzini
Subject: Re: [PATCH] hw/usb: add configuration flags for emulated and passthru usb smartcard
Date: Thu, 24 Nov 2022 08:09:24 +0100



Il mer 23 nov 2022, 08:59 Marc-André Lureau <marcandre.lureau@gmail.com> ha scritto:
config USB_SMARTCARD_PASSTHRU
    bool
    default y
    select USB_SMARTCARD

config USB_SMARTCARD_EMULATED
    bool
    default y
    select USB_SMARTCARD

Yes, this is the way. (TM)

Also, you should add a "config LIBCACARD" (resp. "CONFIG_LIBCACARD=y") symbol to Kconfig.host and the root meson.build, so that you can make these symbols "depends on CACARD" and remove the "if cacard.found()" below.

Paolo



> +
> +config USB_SMARTCARD_EMULATED
> +    bool
> +    default y
> +    depends on USB
>
>  config USB_STORAGE_MTP
>      bool
> diff --git a/hw/usb/meson.build b/hw/usb/meson.build
> index 793df42e21..353006fb6c 100644
> --- a/hw/usb/meson.build
> +++ b/hw/usb/meson.build
> @@ -51,8 +51,8 @@ softmmu_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: files('dev-smartcard-reade
>
>  if cacard.found()
>    usbsmartcard_ss = ss.source_set()
> -  usbsmartcard_ss.add(when: 'CONFIG_USB_SMARTCARD',
> -                      if_true: [cacard, files('ccid-card-emulated.c', 'ccid-card-passthru.c')])
> +  usbsmartcard_ss.add(when: 'CONFIG_USB_SMARTCARD_EMULATED', if_true: [cacard, files('ccid-card-emulated.c')])
> +  usbsmartcard_ss.add(when: 'CONFIG_USB_SMARTCARD_PASSTHRU', if_true: [cacard, files('ccid-card-passthru.c')])
>    hw_usb_modules += {'smartcard': usbsmartcard_ss}
>  endif
>
> --
> 2.35.3
>
>


--
Marc-André Lureau


reply via email to

[Prev in Thread] Current Thread [Next in Thread]