From patchwork Tue Jun 14 01:22:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 100221 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7DE9CB6F89 for ; Tue, 14 Jun 2011 11:47:48 +1000 (EST) Received: from localhost ([::1]:39327 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWIjJ-00057p-DU for incoming@patchwork.ozlabs.org; Mon, 13 Jun 2011 21:47:45 -0400 Received: from eggs.gnu.org ([140.186.70.92]:40952) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWIKe-00086Y-C4 for qemu-devel@nongnu.org; Mon, 13 Jun 2011 21:22:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWIKY-0003f3-LR for qemu-devel@nongnu.org; Mon, 13 Jun 2011 21:22:15 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:59340) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWIKY-0003ez-E8 for qemu-devel@nongnu.org; Mon, 13 Jun 2011 21:22:10 -0400 Received: from smtp08.web.de ( [172.20.5.216]) by fmmailgate03.web.de (Postfix) with ESMTP id B1F9A192343A4; Tue, 14 Jun 2011 03:22:09 +0200 (CEST) Received: from [87.173.124.240] (helo=af.local) by smtp08.web.de with asmtp (WEB.DE 4.110 #2) id 1QWIKX-0002ji-00; Tue, 14 Jun 2011 03:22:09 +0200 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Tue, 14 Jun 2011 03:22:00 +0200 Message-Id: <1308014527-60251-4-git-send-email-andreas.faerber@web.de> X-Mailer: git-send-email 1.7.5.3 In-Reply-To: <1308014527-60251-3-git-send-email-andreas.faerber@web.de> References: <1308014527-60251-1-git-send-email-andreas.faerber@web.de> <1308014527-60251-2-git-send-email-andreas.faerber@web.de> <1308014527-60251-3-git-send-email-andreas.faerber@web.de> MIME-Version: 1.0 X-Sender: Andreas.Faerber@web.de X-Provags-ID: V01U2FsdGVkX1/nMNkPWN3RZdDIp0bNbkE+ikYJoEaDwMLGgON1 qU9P/gGfcVhQRMS5i818E3t7EYDMh6vLQEm8Dem5p4x6AtKuoB 9vWy4kFguEFbWGHssakQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 217.72.192.234 Cc: Alexandre Raymond , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH 03/10] Cocoa: avoid displaying window when command-line contains '-h' or '-help' X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: 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' and '-help' to avoid displaying a window for a split- second before showing the usage information. Signed-off-by: Alexandre Raymond Signed-off-by: Andreas Färber --- ui/cocoa.m | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 1ff1ac6..e1312d3 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -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")) {