]> git.proxmox.com Git - qemu.git/commitdiff
error message if user specifies curses on cmd line when curses is disabled
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 16 Mar 2011 12:33:35 +0000 (13:33 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 22 Mar 2011 13:39:12 +0000 (08:39 -0500)
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-options.hx
vl.c

index 1193d946dabd7ff870917e9db320f40033cc7396..ef60730e4794fad73dbff76009ec74c4ddee9284 100644 (file)
@@ -634,11 +634,9 @@ the console. Therefore, you can still use QEMU to debug a Linux kernel
 with a serial console.
 ETEXI
 
-#ifdef CONFIG_CURSES
 DEF("curses", 0, QEMU_OPTION_curses,
     "-curses         use a curses/ncurses interface instead of SDL\n",
     QEMU_ARCH_ALL)
-#endif
 STEXI
 @item -curses
 @findex curses
diff --git a/vl.c b/vl.c
index 4ca41928e7dcc31b59b584e75c74e528759410c3..11ad8fbf77756b7455435ac9e1b4812ade056f2b 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -2247,11 +2247,14 @@ int main(int argc, char **argv, char **envp)
             case QEMU_OPTION_nographic:
                 display_type = DT_NOGRAPHIC;
                 break;
-#ifdef CONFIG_CURSES
             case QEMU_OPTION_curses:
+#ifdef CONFIG_CURSES
                 display_type = DT_CURSES;
-                break;
+#else
+                fprintf(stderr, "Curses support is disabled\n");
+                exit(1);
 #endif
+                break;
             case QEMU_OPTION_portrait:
                 graphic_rotate = 1;
                 break;