diff options
author | kraxel <kraxel> | 2009-05-19 08:09:16 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2009-05-19 08:09:16 +0000 |
commit | a8484f3985e884b38ca5514ab443f9ed8cccfa19 (patch) | |
tree | d65ef27a330c87d19d3f9c901dca93668477a941 | |
parent | a6ec4d8f20651b072819461705a393a11aeaf2d5 (diff) | |
download | qemu-gtk-a8484f3985e884b38ca5514ab443f9ed8cccfa19.tar.gz |
add textmode optionn (disable vnc, enable serial console).
-rw-r--r-- | monitor.c | 2 | ||||
-rw-r--r-- | qemu-gtk.c | 15 | ||||
-rw-r--r-- | qemu-gtk.h | 1 |
3 files changed, 13 insertions, 5 deletions
@@ -63,7 +63,7 @@ static void monitor_parse_vnc(struct qemu_window *win, char *reply) } } - if (vnc) { + if (vnc && win->vnc_tab) { if (passwd) { win->vnc_password = malloc(32); #if 1 @@ -1001,7 +1001,8 @@ static void usage(FILE *fp) " -d Raise debug level.\n" " -k Keep window open on VM shutdown.\n" " -m Enable monitor logging and access.\n" - " -s Show serial console.\n" + " -s Enable serial console.\n" + " -t Disable VNC, enable serial console.\n" "\n" "-- \n" "(c) 2008 Gerd Hoffmann <kraxel@redhat.com>\n", @@ -1041,12 +1042,13 @@ main(int argc, char *argv[]) char mon[256]; int monitor_tab = 0; int sercon_tab = 0; + int vnc_tab = 1; int quit_on_shutdown = 1; int c; gtk_init(&argc, &argv); for (;;) { - if (-1 == (c = getopt(argc, argv, "hdkms"))) + if (-1 == (c = getopt(argc, argv, "hdkmst"))) break; switch (c) { case 'd': @@ -1056,10 +1058,14 @@ main(int argc, char *argv[]) quit_on_shutdown = 0; break; case 'm': - monitor_tab++; + monitor_tab = 1; break; case 's': - sercon_tab++; + sercon_tab = 1; + break; + case 't': + vnc_tab = 0; + sercon_tab = 1; break; case 'h': usage(stdout); @@ -1086,6 +1092,7 @@ main(int argc, char *argv[]) } win->quit_on_shutdown = quit_on_shutdown; win->sercon_tab = sercon_tab; + win->vnc_tab = vnc_tab; gtk_widget_show_all(win->toplevel); /* tabs */ @@ -76,6 +76,7 @@ struct qemu_window { /* options */ gboolean quit_on_shutdown; gboolean sercon_tab; + gboolean vnc_tab; gboolean vnc_scale; gboolean vnc_grab_mouse; gboolean vnc_grab_kbd; |