diff mbox

spice: Add -spice disable-agent-file-transfer cmdline option (rhbz#961850)

Message ID 1370530887-1342-1-git-send-email-hdegoede@redhat.com
State New
Headers show

Commit Message

Hans de Goede June 6, 2013, 3:01 p.m. UTC
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 ui/spice-core.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox

Patch

diff --git a/ui/spice-core.c b/ui/spice-core.c
index bcc4199..2faac93 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -446,6 +446,9 @@  static QemuOptsList qemu_spice_opts = {
             .name = "disable-copy-paste",
             .type = QEMU_OPT_BOOL,
         },{
+            .name = "disable-agent-file-xfer",
+            .type = QEMU_OPT_BOOL,
+        },{
             .name = "sasl",
             .type = QEMU_OPT_BOOL,
         },{
@@ -739,6 +742,15 @@  void qemu_spice_init(void)
         spice_server_set_agent_copypaste(spice_server, false);
     }
 
+    if (qemu_opt_get_bool(opts, "disable-agent-file-xfer", 0)) {
+#if SPICE_SERVER_VERSION >= 0x000c04
+        spice_server_set_agent_file_xfer(spice_server, false);
+#else
+        error_report("this qemu build does not support the \"disable-agent-file-xfer\" option");
+        exit(1);
+#endif
+    }
+
     compression = SPICE_IMAGE_COMPRESS_AUTO_GLZ;
     str = qemu_opt_get(opts, "image-compression");
     if (str) {