QEMU added the capability to disable file transfers via spice in commit
5ad24e5f3b ("spice: Add -spice disable-agent-file-transfer cmdline
option (rhbz#961850)") released in qemu-v1.6.0 and the option can't be
disabled.
Remove the unnecessary validation.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_validate.c | 7 -------
tests/qemuhotplugtest.c | 1 -
tests/qemuxml2argvtest.c | 6 ++----
tests/qemuxml2xmltest.c | 4 +---
4 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 865b42f81f..13fbfd01b2 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -4031,13 +4031,6 @@ qemuValidateDomainDeviceDefSPICEGraphics(const virDomainGraphicsDef
*graphics,
break;
}
- if (graphics->data.spice.filetransfer == VIR_TRISTATE_BOOL_NO &&
- !virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPICE_FILE_XFER_DISABLE)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("This QEMU can't disable file transfers through
spice"));
- return -1;
- }
-
if (graphics->data.spice.gl == VIR_TRISTATE_BOOL_YES) {
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPICE_GL)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c
index 57d76845c6..ec448da09e 100644
--- a/tests/qemuhotplugtest.c
+++ b/tests/qemuhotplugtest.c
@@ -91,7 +91,6 @@ qemuHotplugCreateObjects(virDomainXMLOption *xmlopt,
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_PIIX_DISABLE_S4);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VNC);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SPICE);
- virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SPICE_FILE_XFER_DISABLE);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_PR_MANAGER_HELPER);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_SCSI_BLOCK);
virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_USB_KBD);
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index e126e828eb..13e387df3f 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1503,8 +1503,7 @@ mymain(void)
QEMU_CAPS_DEVICE_CIRRUS_VGA, QEMU_CAPS_SDL);
DO_TEST("graphics-spice",
QEMU_CAPS_SPICE,
- QEMU_CAPS_DEVICE_QXL,
- QEMU_CAPS_SPICE_FILE_XFER_DISABLE);
+ QEMU_CAPS_DEVICE_QXL);
DO_TEST("graphics-spice-no-args",
QEMU_CAPS_SPICE, QEMU_CAPS_DEVICE_CIRRUS_VGA);
driver.config->spiceSASL = 1;
@@ -1537,8 +1536,7 @@ mymain(void)
QEMU_CAPS_DEVICE_CIRRUS_VGA);
DO_TEST("graphics-spice-agent-file-xfer",
QEMU_CAPS_SPICE,
- QEMU_CAPS_DEVICE_QXL,
- QEMU_CAPS_SPICE_FILE_XFER_DISABLE);
+ QEMU_CAPS_DEVICE_QXL);
DO_TEST("graphics-spice-socket",
QEMU_CAPS_SPICE,
QEMU_CAPS_SPICE_UNIX,
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 59d1e24289..49b291fadb 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -389,8 +389,7 @@ mymain(void)
cfg->spiceTLS = true;
DO_TEST("graphics-spice",
QEMU_CAPS_DEVICE_QXL,
- QEMU_CAPS_SPICE,
- QEMU_CAPS_SPICE_FILE_XFER_DISABLE);
+ QEMU_CAPS_SPICE);
DO_TEST("graphics-spice-compression",
QEMU_CAPS_DEVICE_QXL,
QEMU_CAPS_SPICE);
@@ -1225,7 +1224,6 @@ mymain(void)
QEMU_CAPS_DEVICE_VIRTIO_GPU,
QEMU_CAPS_VIRTIO_GPU_VIRGL,
QEMU_CAPS_SPICE,
- QEMU_CAPS_SPICE_FILE_XFER_DISABLE,
QEMU_CAPS_SPICE_GL,
QEMU_CAPS_SPICE_RENDERNODE);
DO_TEST("video-virtio-gpu-sdl-gl",
--
2.31.1