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