]> git.proxmox.com Git - qemu.git/commitdiff
Cocoa: avoid displaying window when command-line contains '-h' or '-help'
authorAlexandre Raymond <cerbere@gmail.com>
Sun, 29 May 2011 22:22:49 +0000 (18:22 -0400)
committerAndreas Färber <andreas.faerber@web.de>
Tue, 14 Jun 2011 01:08:57 +0000 (03:08 +0200)
There was already a check in place to avoid displaying a window
in certain modes such as vnc, nographic or curses.

Add a check for '-h' and '-help' to avoid displaying a window for a split-
second before showing the usage information.

Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
ui/cocoa.m

index 1ff1ac641fa36ea9d7e3ce24e6da28fe0ac200e4..e1312d347a3962f1b9c7b04f3dc05b57ad593444 100644 (file)
@@ -872,7 +872,8 @@ int main (int argc, const char * argv[]) {
             if (opt[1] == '-') {
                 opt++;
             }
-            if (!strcmp(opt, "-vnc") ||
+            if (!strcmp(opt, "-h") || !strcmp(opt, "-help") ||
+                !strcmp(opt, "-vnc") ||
                 !strcmp(opt, "-nographic") ||
                 !strcmp(opt, "-version") ||
                 !strcmp(opt, "-curses")) {