From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQ0ma-0000dk-3c for qemu-devel@nongnu.org; Fri, 27 May 2011 13:25:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQ0mZ-0003gA-Fh for qemu-devel@nongnu.org; Fri, 27 May 2011 13:25:08 -0400 From: Alexandre Raymond Date: Fri, 27 May 2011 13:22:27 -0400 Message-Id: <1306516951-31105-3-git-send-email-cerbere@gmail.com> In-Reply-To: <1306516951-31105-1-git-send-email-cerbere@gmail.com> References: <1306516951-31105-1-git-send-email-cerbere@gmail.com> Subject: [Qemu-devel] [PATCH 2/6] Cocoa: avoid displaying window when command-line contains '-h' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Alexandre Raymond 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' to avoid displaying a window for a split- second before showing the usage information. Signed-off-by: Alexandre Raymond --- ui/cocoa.m | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 20f91bc..7fb8d96 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -865,7 +865,8 @@ int main (int argc, const char * argv[]) { /* In case we don't need to display a window, let's not do that */ for (i = 1; i < argc; i++) { - if (!strcmp(argv[i], "-vnc") || + if (!strcmp(argv[i], "-h") || + !strcmp(argv[i], "-vnc") || !strcmp(argv[i], "-nographic") || !strcmp(argv[i], "-curses")) { return qemu_main(gArgc, gArgv); -- 1.7.5