aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-08-25 01:36:20 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-08-25 01:36:20 +0000
commite25a5822ca2dfd229471cc5d02458956b1bf0fa8 (patch)
tree20f7958af2bea0ca2ab2d8dbd23e3edfcfcfb8f8 /monitor.c
parent71cab5ca0d9f10cf9f07eaf3033687bf85459d52 (diff)
Extend monitor 'change' command for VNC, by Daniel P. Berrange.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3134 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index ed31d5031a..65668fda0f 100644
--- a/monitor.c
+++ b/monitor.c
@@ -386,7 +386,7 @@ static void do_eject(int force, const char *filename)
eject_device(bs, force);
}
-static void do_change(const char *device, const char *filename)
+static void do_change_block(const char *device, const char *filename)
{
BlockDriverState *bs;
@@ -401,6 +401,21 @@ static void do_change(const char *device, const char *filename)
qemu_key_check(bs, filename);
}
+static void do_change_vnc(const char *target)
+{
+ if (vnc_display_open(NULL, target) < 0)
+ term_printf("could not start VNC server on %s\n", target);
+}
+
+static void do_change(const char *device, const char *target)
+{
+ if (strcmp(device, "vnc") == 0) {
+ do_change_vnc(target);
+ } else {
+ do_change_block(device, target);
+ }
+}
+
static void do_screen_dump(const char *filename)
{
vga_hw_screen_dump(filename);