]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: add usb-redir.filter qemu capability flag
authorGuannan Ren <gren@redhat.com>
Sun, 19 Aug 2012 15:42:44 +0000 (23:42 +0800)
committerGuannan Ren <gren@redhat.com>
Thu, 13 Sep 2012 07:30:02 +0000 (15:30 +0800)
Add a qemu flag for USB redirection filter support.

The output:
usb-redir.chardev=chr
usb-redir.debug=uint8
usb-redir.filter=string
usb-redir.port=string

src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h

index ed85b6f0c8f334339a9513267458244f928b2b04..623c6a099dc84e1a774e99bccf0a77e5749bbe77 100644 (file)
@@ -176,6 +176,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
               "disable-s3",
 
               "disable-s4", /* 105 */
+              "usb-redir.filter",
     );
 
 struct qemu_feature_flags {
@@ -1407,6 +1408,7 @@ qemuCapsExtractDeviceStr(const char *qemu,
                          "-device", "virtio-net-pci,?",
                          "-device", "scsi-disk,?",
                          "-device", "PIIX4_PM,?",
+                         "-device", "usb-redir,?",
                          NULL);
     /* qemu -help goes to stdout, but qemu -device ? goes to stderr.  */
     virCommandSetErrorBuffer(cmd, &output);
@@ -1452,6 +1454,8 @@ qemuCapsParseDeviceStr(const char *str, virBitmapPtr flags)
         qemuCapsSet(flags, QEMU_CAPS_NEC_USB_XHCI);
     if (strstr(str, "name \"usb-redir\""))
         qemuCapsSet(flags, QEMU_CAPS_USB_REDIR);
+    if (strstr(str, "usb-redir.filter"))
+        qemuCapsSet(flags, QEMU_CAPS_USB_REDIR_FILTER);
     if (strstr(str, "name \"usb-hub\""))
         qemuCapsSet(flags, QEMU_CAPS_USB_HUB);
     if (strstr(str, "name \"ich9-ahci\""))
index 49d64e5fc58caf65a4428384def88c61db14f9ce..3b9629bd112496196bec2a6ea34934fdcf05fc33 100644 (file)
@@ -141,6 +141,7 @@ enum qemuCapsFlags {
     QEMU_CAPS_BLOCKIO            = 103, /* -device ...logical_block_size & co */
     QEMU_CAPS_DISABLE_S3         = 104, /* S3 BIOS Advertisement on/off */
     QEMU_CAPS_DISABLE_S4         = 105, /* S4 BIOS Advertisement on/off */
+    QEMU_CAPS_USB_REDIR_FILTER   = 106, /* usb-redir.filter */
 
     QEMU_CAPS_LAST,                   /* this must always be the last item */
 };