Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3841383ybb; Mon, 6 Apr 2020 17:17:18 -0700 (PDT) X-Google-Smtp-Source: APiQypLRc260VzXQ0KRw8/ltUsfKCpwkj9gWWkUi3Nb4madGsgbrDidih4XnDhzdr3xAsJwUiCJu X-Received: by 2002:aca:c6ca:: with SMTP id w193mr1438190oif.165.1586218638688; Mon, 06 Apr 2020 17:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586218638; cv=none; d=google.com; s=arc-20160816; b=wVkNHNReSMySttdhJNecy6gGcjWepip3NJAfrytChLi2y67S4oU+M06no9SKsVq904 3IwT9qEk3dZXrYjvZ6KofPkglBGrDamqLkQA+JFzdAgntUq1p77b7WD1nxktjx5aJycy Oe99lFZgal5aIfzImXvKJ2pUAEj8QxmGkQtTIDjRDPG0ssXReNz4W64uJnIRHGeZVWOh n3D7GjrD6s/BFqmPR2SrRArExOFfWbcUHnuvgCDXq0OBnhPVjOO63r8RGE2qDDG9aVQL E4j+ZRDvSyyhUBLE/AS7Wv+oDdqu2czTDpOod4lFDEmN0FHwGcSja5RTZ1z8pSSxMhOy pClg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3vH5WbHKuWBqtZnrxm5e0ptpN3/tK3bRHsJUE87/js8=; b=PFPyp/nT0bCPSf9CZwIAWZCFgUB36tm8ilrRBb0+4N6AwAXEOP4VyzJ9NAUjXJGQQh wQBhJGZfmxoosWluPCHlk8CB90yW78NIJ6UP3qoSh+kTIsMloEq6ohTdPnPNAMZ4WR2K PY/LZdZlbxrNyjHjKUK3VeW2ofCdTlzHStpbHhVX5mYERaElUCRtkL724aofI/9JEwUb MQEaI/5Kfhf70S2CdWSu7aJrg83q1QqNQRYksXELdYDtfPA0Ccev51CsFqnblxHpZOpj eO7ejNv6Tt6iPrU/yW4VAgcBiNxFY5Ho1+egWBfoMgqfQAd+IgBFn5VZ8LUVi6kM+Wmq BK/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="ZRw/oz0C"; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w28si545208oth.317.2020.04.06.17.16.45; Mon, 06 Apr 2020 17:17:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="ZRw/oz0C"; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726254AbgDGAQj (ORCPT + 99 others); Mon, 6 Apr 2020 20:16:39 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:37275 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726230AbgDGAQj (ORCPT ); Mon, 6 Apr 2020 20:16:39 -0400 Received: by mail-ot1-f66.google.com with SMTP id g23so1341160otq.4 for ; Mon, 06 Apr 2020 17:16:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3vH5WbHKuWBqtZnrxm5e0ptpN3/tK3bRHsJUE87/js8=; b=ZRw/oz0CzTrV0KcXTLayHJhRpkuR0n0922ssGcZreHLg4Gk5kiR8l5JjMAZhzI1cw5 d+OdJqx9hnIqVdk+T2WJ4AAbFH6q9BYpj7pL4N72pOOmh1Bkezh8cxwix42eZhozG/rH gAhQz55cA2quRiSxBV/NzSmYlWDgA8pOTn5wG1BVxKl1BLIUfkAl/L6eq/oGuQfBmiDV zvqZSTVlQ7WQYbYYRp/Rs4XCoItWmlxzARyp2A9hZbwlQjZTaBYUG96riQr9ltciMiPV kPhjoIb/pG8mAiXSGPqB8fHfMzGC8s/XmMqHEK5Khba4uk/ktKa008dpEcJwSHsi4NsK n8Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3vH5WbHKuWBqtZnrxm5e0ptpN3/tK3bRHsJUE87/js8=; b=ZQ1+uf/6h1188YaXAFMwrz4T188Vt7K7mm6rkvLLm7YlSFPDR/rbAqqsBUtD8BBjq+ Rgo8TKCwxyd1X4jqUS/TMDndwZnPBvp6WiHmTYab8YiLaOm4NYdfEtTor6a/vLi8w6AC zrQARmQKoBTmggdNjXUtKj36yyz6rsaZoeQbvbv1bd9tdMfhkUP775IjIjbFL8nomqOa Ap3LpFWoqvQz92qR8hLMj9ZOYdzGyH1JqIWhVwU4NvY7nvo2SQRlLAp8yfETEjVIoYos VciFZFFtTbAGSOYZuwi/LhGZmQucXDDaWAVa5V5l0auQSs60wB1RO6/YaEqsOYF9n6nd WDQA== X-Gm-Message-State: AGi0PubyBwHSmeR756/imcSDYd3kQWWKRFl5MPRdPSmu9QmLZM9xEoPP Hu1uaZahfsD+OA34IaZjzRei8ZQjvWorobMbqfCO++qb X-Received: by 2002:a4a:2cc6:: with SMTP id o189mr1476436ooo.20.1586218598763; Mon, 06 Apr 2020 17:16:38 -0700 (PDT) MIME-Version: 1.0 References: <20200406201410.11803-1-olivier@labapart.com> In-Reply-To: <20200406201410.11803-1-olivier@labapart.com> From: Luiz Augusto von Dentz Date: Mon, 6 Apr 2020 17:16:27 -0700 Message-ID: Subject: Re: [PATCH BlueZ] emulator: Fix command line parameters with optional argument To: Olivier Martin Cc: "linux-bluetooth@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Olivier, On Mon, Apr 6, 2020 at 3:45 PM Olivier Martin wrote: > > Some parameters were missing the indication that additional > argument could be expected. > --- > emulator/main.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/emulator/main.c b/emulator/main.c > index 68c53488e..3e32bf95d 100644 > --- a/emulator/main.c > +++ b/emulator/main.c > @@ -58,8 +58,10 @@ static void usage(void) > "\t-s Create local server sockets\n" > "\t-l [num] Number of local controllers\n" > "\t-L Create LE only controller\n" > + "\t-U [num] Number of test LE controllers\n" > "\t-B Create BR/EDR only controller\n" > "\t-A Create AMP controller\n" > + "\t-T [num] Number of test AMP controllers\n" > "\t-h, --help Show help options\n"); > } Actually optional arguments cannot have spaces in between the option, that is why one need to do -L2 for example as -L 2 would ignore the number, perhaps we should actually document the long version with --le=2 which should probably be the prefered method. > @@ -97,7 +99,7 @@ int main(int argc, char *argv[]) > for (;;) { > int opt; > > - opt = getopt_long(argc, argv, "Ssl::LBAUTvh", > + opt = getopt_long(argc, argv, "Ssl::LBAU::T::vh", > main_options, NULL); > if (opt < 0) > break; > -- > 2.17.1 > -- Luiz Augusto von Dentz