Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4708583ybb; Tue, 7 Apr 2020 12:50:09 -0700 (PDT) X-Google-Smtp-Source: APiQypLRYaz2EstW5X5T3LMUS6a15hwPkoXnsqwyR03KsFQLmVWXVe+81Dktit97bNdZBn6PA6kJ X-Received: by 2002:a9d:7488:: with SMTP id t8mr2904570otk.219.1586289009533; Tue, 07 Apr 2020 12:50:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586289009; cv=none; d=google.com; s=arc-20160816; b=Qsn/ZbC0+Iqknodubsl3RYwTcU6Rrmh/xEKRt8BuW5LjqzDkER+VB00Eyt3RhnMUml JLi1/7eYWylc2nC01q22WzqgdjH0cqqd8rJqsF1JI2AcwajY3VHCpiZW+9Bmxhe0BtIi N5GZdcA+j+Hxk3ZuG7Lww9cXjgxH0WFxZ3aPRE1Y8CMyi8Aul5pKGjdlzbvjeQdI4t/h RuctP63PDGvMxG5XAIhpKCc7l6EZaXELs+TvtqzaLRcTawKtyOhJ9gmpI+OCwzTmGbMu Bvsbrbo8aL4ZSwKnRMr6Urf8Xrhav/JL7p2ibi8mrgy2Pq1c7Im8teOAg4ucsRAlQ3nJ ZNRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=KT07k4sMliHZBvXU50E0303z2j24W2aUmr59yaUy7H8=; b=Qncgyg+tmgnOIf9/VdQom4yCJxcz1Cx+4dfa98fvEaONkARHzB9laDmHEpcKCWtYGg n0i15SERuv16mdnjwbcaDZrRUUf9YXCZMQhsyfkQ0sZ1ju3AoVubFnAg4jgac9c3DMdl UzcTTeBzpAt0tWmf2MjfqR1dj/45IKVtMdMSRjfeMaa2O9FiaZHqKG/cjcgZF/4cHOHi nD/lTXhjJW6M9UxiTSIyhlE3gZDcfrMW+FmByfASa73sIURCurOpn7X8TnYtn3bmwHgO idDoV4Zngw1mmMFdZJRFJxDLNhdSrF1zCDufnmp5H8iR44QFjFJMe60rFijMvyXvMJSM sfPg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t2si1065218oih.136.2020.04.07.12.49.36; Tue, 07 Apr 2020 12:50:09 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726801AbgDGTt3 (ORCPT + 99 others); Tue, 7 Apr 2020 15:49:29 -0400 Received: from 8.mo178.mail-out.ovh.net ([46.105.74.227]:57660 "EHLO 8.mo178.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726719AbgDGTt3 (ORCPT ); Tue, 7 Apr 2020 15:49:29 -0400 X-Greylist: delayed 425 seconds by postgrey-1.27 at vger.kernel.org; Tue, 07 Apr 2020 15:49:28 EDT Received: from player159.ha.ovh.net (unknown [10.108.42.145]) by mo178.mail-out.ovh.net (Postfix) with ESMTP id 2F49D993D2 for ; Tue, 7 Apr 2020 21:44:05 +0200 (CEST) Received: from labapart.com (mue-88-130-59-209.dsl.tropolys.de [88.130.59.209]) (Authenticated sender: olivier@labapart.com) by player159.ha.ovh.net (Postfix) with ESMTPSA id D874F1130FF92; Tue, 7 Apr 2020 19:44:03 +0000 (UTC) From: Olivier Martin To: linux-bluetooth@vger.kernel.org Cc: Olivier Martin Subject: [PATCH BlueZ v3] emulator: Fix command line parameters with optional argument Date: Tue, 7 Apr 2020 21:44:00 +0200 Message-Id: <20200407194400.5960-1-olivier@labapart.com> X-Mailer: git-send-email 2.17.1 X-Ovh-Tracer-Id: 15565847689298013772 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrudehgddufeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvffufffkofestddtredtredttdenucfhrhhomhepqfhlihhvihgvrhcuofgrrhhtihhnuceoohhlihhvihgvrheslhgrsggrphgrrhhtrdgtohhmqeenucfkpheptddrtddrtddrtddpkeekrddufedtrdehledrvddtleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrhduheelrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepohhlihhvihgvrheslhgrsggrphgrrhhtrdgtohhmpdhrtghpthhtoheplhhinhhugidqsghluhgvthhoohhthhesvhhgvghrrdhkvghrnhgvlhdrohhrgh Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Some parameters were missing the indication that additional argument could be expected. --- emulator/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/emulator/main.c b/emulator/main.c index 68c53488e..75cb79c7b 100644 --- a/emulator/main.c +++ b/emulator/main.c @@ -56,10 +56,12 @@ static void usage(void) printf("options:\n" "\t-S Create local serial port\n" "\t-s Create local server sockets\n" - "\t-l [num] Number of local controllers\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"); } @@ -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