Unknown
2013-Aug-14 15:09 UTC
[PATCH] libxl: Spice disable-copy-paste support for upstream qemu
From: Fabio Fantoni <fabio.fantoni@m2r.biz> Usage: spicedisable_copypaste=1|0 (default=0) Disables clipboard sharing (copy/paste). Requires this patch: libxl: Spice vdagent support for upstream qemu Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> --- 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(+) diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 index 170bc11..965ea1c 100644 --- a/docs/man/xl.cfg.pod.5 +++ b/docs/man/xl.cfg.pod.5 @@ -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 diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 62b283f..d5f07bd 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -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); diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 8eff23d..4aecb90 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -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; } diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index eb242db..718ebb6 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -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", [ diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 9892783..757d41b 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -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); -- 1.7.9.5