aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-06-24 14:33:09 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-06-24 14:33:09 -0500
commit9fbbf0d1b16a0e3e4132b187c2beba458964ea98 (patch)
tree084af4af502603e1027253721af74b9b97506be5
parent89f204d2c60fbf3e0c5af1ff1681e57c9f057178 (diff)
parent5ad24e5f3b5968240d50fb2e5b6e19517b041052 (diff)
Merge remote-tracking branch 'spice/spice.v71' into staging
# By Gerd Hoffmann (1) and Hans de Goede (1) # Via Gerd Hoffmann * spice/spice.v71: spice: Add -spice disable-agent-file-transfer cmdline option (rhbz#961850) qxl: fix Coverity scan SIGN_EXTENSION error Message-id: 1372060666-18182-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/display/qxl-render.c2
-rw-r--r--qemu-options.hx7
-rw-r--r--ui/spice-core.c13
3 files changed, 19 insertions, 3 deletions
diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c
index f511a622c6..269b1a7568 100644
--- a/hw/display/qxl-render.c
+++ b/hw/display/qxl-render.c
@@ -199,7 +199,7 @@ static QEMUCursor *qxl_cursor(PCIQXLDevice *qxl, QXLCursor *cursor)
c->hot_y = cursor->header.hot_spot_y;
switch (cursor->header.type) {
case SPICE_CURSOR_TYPE_ALPHA:
- size = cursor->header.width * cursor->header.height * sizeof(uint32_t);
+ size = sizeof(uint32_t) * cursor->header.width * cursor->header.height;
memcpy(c->data, cursor->chunk.data, size);
if (qxl->debug > 2) {
cursor_print_ascii_art(c, "qxl/alpha");
diff --git a/qemu-options.hx b/qemu-options.hx
index 688040ef72..ca6fdf6134 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -917,8 +917,8 @@ DEF("spice", HAS_ARG, QEMU_OPTION_spice,
" [,jpeg-wan-compression=[auto|never|always]]\n"
" [,zlib-glz-wan-compression=[auto|never|always]]\n"
" [,streaming-video=[off|all|filter]][,disable-copy-paste]\n"
- " [,agent-mouse=[on|off]][,playback-compression=[on|off]]\n"
- " [,seamless-migration=[on|off]]\n"
+ " [,disable-agent-file-xfer][,agent-mouse=[on|off]]\n"
+ " [,playback-compression=[on|off]][,seamless-migration=[on|off]]\n"
" enable spice\n"
" at least one of {port, tls-port} is mandatory\n",
QEMU_ARCH_ALL)
@@ -961,6 +961,9 @@ Allow client connects without authentication.
@item disable-copy-paste
Disable copy paste between the client and the guest.
+@item disable-agent-file-xfer
+Disable spice-vdagent based file-xfer between the client and the guest.
+
@item tls-port=<nr>
Set the TCP port spice is listening on for encrypted channels.
diff --git a/ui/spice-core.c b/ui/spice-core.c
index bcc4199e7a..f308fd9d5e 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,16 @@ 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) {