Skip to contentSkip to conversation

libxl: Spice disable-copy-paste support for upstream qemu

PATCH New Unknown 1 participant 1 message Aug 14, 2013

lore
Share & tools
lore

Unknown

author
#0 lore raw

PATCH 1/1 libxl: Spice disable-copy-paste support for upstream qemu

From: Fabio Fantoni <[email protected]>

Usage: spicedisable_copypaste=1|0 (default=0)
Disables clipboard sharing (copy/paste).

Requires this patch:
libxl: Spice vdagent support for upstream qemu

---
 docs/man/xl.cfg.pod.5       |    4 ++++
 tools/libxl/libxl_create.c  |    2 ++
 tools/libxl/libxl_dm.c      |    4 ++++
 tools/libxl/libxl_types.idl |    1 +
 tools/libxl/xl_cmdimpl.c    |    2 ++
 5 files changed, 13 insertions(+)
docs/man/xl.cfg.pod.5 +4 -0
index 170bc11..965ea1c 100644
@@ -1139,6 +1139,10 @@ by client, no mouse lag), automatic adjustment of screen resolution,
 copy and paste (text and image) between client and domU. It also
 requires vdagent service installed on domU o.s. to work. The default is 0.
 
+=item B<spicedisable_copypaste=BOOLEAN>
+
+Disables clipboard sharing (copy/paste). The default is false (0).
+
 =back
 
 =head3 Miscellaneous Emulated Hardware
tools/libxl/libxl_create.c +2 -0
index 62b283f..d5f07bd 100644
@@ -273,6 +273,8 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc,
                                      false);
             libxl_defbool_setdefault(&b_info->u.hvm.spice.agent_mouse, true);
             libxl_defbool_setdefault(&b_info->u.hvm.spice.vdagent, false);
+            libxl_defbool_setdefault(&b_info->u.hvm.spice.disable_copypaste,
+                                     false);
         }
 
         libxl_defbool_setdefault(&b_info->u.hvm.nographic, false);
tools/libxl/libxl_dm.c +4 -0
index 8eff23d..4aecb90 100644
@@ -342,6 +342,10 @@ static char *dm_spice_options(libxl__gc *gc,
         opt = libxl__sprintf(gc, "%s,password=%s", opt, spice->passwd);
     opt = libxl__sprintf(gc, "%s,agent-mouse=%s", opt,
                          libxl_defbool_val(spice->agent_mouse) ? "on" : "off");
+
+    if (libxl_defbool_val(spice->disable_copypaste))
+        opt = libxl__sprintf(gc, "%s,disable-copy-paste", opt);
+
     return opt;
 }
 
tools/libxl/libxl_types.idl +1 -0
index eb242db..718ebb6 100644
@@ -176,6 +176,7 @@ libxl_spice_info = Struct("spice_info", [
     ("passwd",      string),
     ("agent_mouse", libxl_defbool),
     ("vdagent",     libxl_defbool),
+    ("disable_copypaste", libxl_defbool),
     ])
 
 libxl_sdl_info = Struct("sdl_info", [
tools/libxl/xl_cmdimpl.c +2 -0
index 9892783..757d41b 100644
@@ -1497,6 +1497,8 @@ skip_vfb:
                             &b_info->u.hvm.spice.agent_mouse, 0);
         xlu_cfg_get_defbool(config, "spicevdagent",
                             &b_info->u.hvm.spice.vdagent, 0);
+        xlu_cfg_get_defbool(config, "spicedisable_copypaste",
+                            &b_info->u.hvm.spice.disable_copypaste, 0);
         xlu_cfg_get_defbool(config, "nographic", &b_info->u.hvm.nographic, 0);
         xlu_cfg_get_defbool(config, "gfx_passthru", 
                             &b_info->u.hvm.gfx_passthru, 0);
Signature · 1 line
1.7.9.5