Blame SOURCES/libvirt-qemu-capabilities-Add-capability-for-werror-rerror-for-usb-device-frontend.patch

9c6c51
From 81505bfde8f4acf9b94a1c6dc010d707dcd49b6a Mon Sep 17 00:00:00 2001
9c6c51
Message-Id: <81505bfde8f4acf9b94a1c6dc010d707dcd49b6a@dist-git>
9c6c51
From: Peter Krempa <pkrempa@redhat.com>
9c6c51
Date: Thu, 19 Jul 2018 15:03:48 +0200
9c6c51
Subject: [PATCH] qemu: capabilities: Add capability for werror/rerror for
9c6c51
 'usb-device' frontend
9c6c51
MIME-Version: 1.0
9c6c51
Content-Type: text/plain; charset=UTF-8
9c6c51
Content-Transfer-Encoding: 8bit
9c6c51
9c6c51
Support for specifying it with the -device frontend was added recently.
9c6c51
Add a capability for it.
9c6c51
9c6c51
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
9c6c51
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9c6c51
(cherry picked from commit a087a8e60ad62a719165e3c2c9970480b9531062)
9c6c51
9c6c51
https://bugzilla.redhat.com/show_bug.cgi?id=1475770
9c6c51
Signed-off-by: Erik Skultety <eskultet@redhat.com>
9c6c51
Reviewed-by: Ján Tomko <jtomko@redhat.com>
9c6c51
---
9c6c51
 src/qemu/qemu_capabilities.c                     | 2 ++
9c6c51
 src/qemu/qemu_capabilities.h                     | 1 +
9c6c51
 tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 +
9c6c51
 3 files changed, 4 insertions(+)
9c6c51
9c6c51
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
9c6c51
index c7da916f9a..23b483349f 100644
9c6c51
--- a/src/qemu/qemu_capabilities.c
9c6c51
+++ b/src/qemu/qemu_capabilities.c
9c6c51
@@ -502,6 +502,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
9c6c51
               "sev-guest",
9c6c51
               "machine.pseries.cap-hpt-max-page-size",
9c6c51
               "machine.pseries.cap-htm",
9c6c51
+              "usb-storage.werror",
9c6c51
     );
9c6c51
 
9c6c51
 
9c6c51
@@ -1240,6 +1241,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsUSBStorage[] = {
9c6c51
     { "removable", QEMU_CAPS_USB_STORAGE_REMOVABLE },
9c6c51
     { "share-rw", QEMU_CAPS_DISK_SHARE_RW },
9c6c51
     { "write-cache", QEMU_CAPS_DISK_WRITE_CACHE },
9c6c51
+    { "werror", QEMU_CAPS_USB_STORAGE_WERROR },
9c6c51
 };
9c6c51
 
9c6c51
 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsKVMPit[] = {
9c6c51
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
9c6c51
index a048a1cf02..1fa0ebfea3 100644
9c6c51
--- a/src/qemu/qemu_capabilities.h
9c6c51
+++ b/src/qemu/qemu_capabilities.h
9c6c51
@@ -486,6 +486,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
9c6c51
     QEMU_CAPS_SEV_GUEST, /* -object sev-guest,... */
9c6c51
     QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE, /* -machine pseries.cap-hpt-max-page-size */
9c6c51
     QEMU_CAPS_MACHINE_PSERIES_CAP_HTM, /* -machine pseries.cap-htm */
9c6c51
+    QEMU_CAPS_USB_STORAGE_WERROR, /* -device usb-storage,werror=..,rerror=.. */
9c6c51
 
9c6c51
     QEMU_CAPS_LAST /* this must always be the last item */
9c6c51
 } virQEMUCapsFlags;
9c6c51
diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
9c6c51
index 07e3de8677..d7c25c65dd 100644
9c6c51
--- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
9c6c51
+++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml
9c6c51
@@ -209,6 +209,7 @@
9c6c51
   <flag name='mch'/>
9c6c51
   <flag name='mch.extended-tseg-mbytes'/>
9c6c51
   <flag name='sev-guest'/>
9c6c51
+  <flag name='usb-storage.werror'/>
9c6c51
   <version>2012050</version>
9c6c51
   <kvmVersion>0</kvmVersion>
9c6c51
   <microcodeVersion>437827</microcodeVersion>
9c6c51
-- 
9c6c51
2.18.0
9c6c51