From patchwork Fri Oct 2 13:00:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 54427 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id D57BA23009 for ; Fri, 2 Oct 2015 13:42:35 +0000 (UTC) Received: by lbwr8 with SMTP id r8sf16714672lbw.0 for ; Fri, 02 Oct 2015 06:42:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=+sEz//3q7ag0f6jjUEiqzNY0QM0q5PV7NsRbtP2g1jc=; b=by+SiaK6Ur3nzdAusFZMB00RkRCvZbg2NXJICXYH/TPsXnuVG7J+5rn3TtveXMevOT GJZ+nSLrGNsTt1tswe4uZr5MVFDrGfenGLcMOvIqtMQ9GTUjyRwI7KTF2rbKnm51d72u foyH3s6M11g/A8I93UKJTJqGmHRarKIhGzQjL9Kh2ku0GJCP4iSHc+gBs7FQ+vzlx/qC c8s4ZOaYWy/z7DHIFajB/EQ3p29C5HWFR1LxFO4yALm4mpeNHTJv0joP749yyY5X2QOJ wfbzxs37tF/uPLQWZiCxKox3QPmsjqTAtUGox3/zR5ou6XtU+0ZaLpUbYhRPzKzFm9/9 E0gQ== X-Gm-Message-State: ALoCoQlRvr51doCj31J7uBBrc6av06IePNLYmFeSFblVLyXBHLSSV9Ww9smelIAPv6kbcnztABKT X-Received: by 10.180.12.170 with SMTP id z10mr963153wib.1.1443793354736; Fri, 02 Oct 2015 06:42:34 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.20.65 with SMTP id k62ls212588lfi.16.gmail; Fri, 02 Oct 2015 06:42:34 -0700 (PDT) X-Received: by 10.112.63.67 with SMTP id e3mr5636714lbs.92.1443793354436; Fri, 02 Oct 2015 06:42:34 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id r143si6280753lfr.106.2015.10.02.06.42.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Oct 2015 06:42:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbcao8 with SMTP id ao8so26678179lbc.3 for ; Fri, 02 Oct 2015 06:42:34 -0700 (PDT) X-Received: by 10.25.28.73 with SMTP id c70mr3042066lfc.76.1443793354303; Fri, 02 Oct 2015 06:42:34 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1253533lbq; Fri, 2 Oct 2015 06:42:33 -0700 (PDT) X-Received: by 10.140.100.182 with SMTP id s51mr18908542qge.25.1443793353228; Fri, 02 Oct 2015 06:42:33 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p72si10346693qkh.25.2015.10.02.06.42.32 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 02 Oct 2015 06:42:33 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:59844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zi0bW-0005ba-SA for patch@linaro.org; Fri, 02 Oct 2015 09:42:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zhzxg-0005KQ-Dz for qemu-devel@nongnu.org; Fri, 02 Oct 2015 09:01:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zhzxc-0000b6-2e for qemu-devel@nongnu.org; Fri, 02 Oct 2015 09:01:20 -0400 Received: from mail-la0-f47.google.com ([209.85.215.47]:33662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zhzxb-0000b0-SU for qemu-devel@nongnu.org; Fri, 02 Oct 2015 09:01:16 -0400 Received: by lafb9 with SMTP id b9so3893834laf.0 for ; Fri, 02 Oct 2015 06:01:15 -0700 (PDT) X-Received: by 10.25.160.133 with SMTP id j127mr3454129lfe.85.1443790875139; Fri, 02 Oct 2015 06:01:15 -0700 (PDT) Received: from localhost.localdomain (91-157-196-38.elisa-laajakaista.fi. [91.157.196.38]) by smtp.gmail.com with ESMTPSA id w143sm1514751lfd.2.2015.10.02.06.01.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 02 Oct 2015 06:01:14 -0700 (PDT) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Fri, 2 Oct 2015 16:00:57 +0300 Message-Id: X-Mailer: git-send-email 2.5.3 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.215.47 Cc: Meador Inge Subject: [Qemu-devel] [PULL 05/13] linux-user: Treat --foo options the same as -foo 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Meador Inge The system mode binaries provide a similar alias and it makes common options like --version and --help work as expected. Signed-off-by: Meador Inge Signed-off-by: Riku Voipio --- linux-user/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux-user/main.c b/linux-user/main.c index c7c39d4..6599a41 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -4024,6 +4024,10 @@ static int parse_args(int argc, char **argv) if (!strcmp(r, "-")) { break; } + /* Treat --foo the same as -foo. */ + if (r[0] == '-') { + r++; + } for (arginfo = arg_table; arginfo->handle_opt != NULL; arginfo++) { if (!strcmp(r, arginfo->argv)) {