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

Re: [libvirt] [PATCHv3 3/5] smartcard: check for qemu capability



On Tue, Jan 25, 2011 at 05:36:56PM -0700, Eric Blake wrote:
> Qemu smartcard support exists on branches (such as
> http://cgit.freedesktop.org/~alon/qemu/commit/?h=usb_ccid.v15&id=024a37b)
> but is not yet upstream.  Once an upstream version exists, then we
> can add new -help and -device ? output files  to tests/qemuhelptest
> to prove that the new flag works.
> 
> * src/qemu/qemu_capabilities.h (QEMUD_CMD_FLAG_USB_CCID): New
> flag.
> * src/qemu/qemu_capabilities.c (qemuCapsExtractDeviceStr)
> (qemuCapsParseDeviceStr): Check for smartcard device support.
> 
> Notes:
>     v2: rebase to latest tree
>     v3: rebase to latest tree
> ---
>  src/qemu/qemu_capabilities.c |    2 ++
>  src/qemu/qemu_capabilities.h |    1 +
>  2 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 37a97aa..8c1b95d 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -1084,6 +1084,8 @@ qemuCapsParseDeviceStr(const char *str, unsigned long long *flags)
>      /* Which devices exist. */
>      if (strstr(str, "name \"hda-duplex\""))
>          *flags |= QEMUD_CMD_FLAG_HDA_DUPLEX;
> +    if (strstr(str, "name \"usb-ccid\""))
> +        *flags |= QEMUD_CMD_FLAG_USB_CCID;
> 
>      /* Features of given devices. */
>      if (strstr(str, "pci-assign.configfd"))
> diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
> index 59bb22a..caba667 100644
> --- a/src/qemu/qemu_capabilities.h
> +++ b/src/qemu/qemu_capabilities.h
> @@ -86,6 +86,7 @@ enum qemuCapsFlags {
>      QEMUD_CMD_FLAG_BOOTINDEX     = (1LL << 49), /* -device bootindex property */
>      QEMUD_CMD_FLAG_HDA_DUPLEX    = (1LL << 50), /* -device hda-duplex */
>      QEMUD_CMD_FLAG_DRIVE_AIO     = (1LL << 51), /* -drive aio= supported */
> +    QEMUD_CMD_FLAG_USB_CCID      = (1LL << 52), /* -device usb-ccid */
>  };

ACK

Daniel


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