Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4708695ybb; Tue, 7 Apr 2020 12:50:16 -0700 (PDT) X-Google-Smtp-Source: APiQypJwbDpu9lW3PJGPF2v1TcijWq4XWoWWXD1b6gXKb++IWkrKOBCf5YGQNAOtvPLqvtnEaNcu X-Received: by 2002:aca:4a08:: with SMTP id x8mr419692oia.158.1586289016405; Tue, 07 Apr 2020 12:50:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586289016; cv=none; d=google.com; s=arc-20160816; b=QyncQkO+sK228do4bPrVnzZLO9bJm2juuth5QTFXEGBFQW8M21+046DvslrKjKb2Nz tSyhvc8yhNyWGmdFKGhWM0HSyZyWTaBgKzrEz34GPVTiIRbUpPfPkYXxlmFRBIrIWv/v YPr+7wJh0MG6emF1Eo5aM4f9z6khCda0nM4MlGwSizCRrShtyFkGeeOn9TVDOzW28l5v D+KF+iB/hij7fS28qxCWrHv4kOWksly7YtMPGcofzy7s7vSGXRvsyLnuKf8rumnHcwn3 Ik9DdXzn/yw1yFZeHjH8TgQUvVs51+04eJQod748hefRhME1RLOB30wqgyBGQsuhCUfZ 6Wug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject; bh=kRz49blU4FqgT2lU8aA//lpTaOxQ9jFWVIQv5b9zwk0=; b=XjYE5FlDRNw5Y4C3rZNph0X6itBzXcOL0hY6oHFMSZqbYvUoJ8HRELczk5IiwjwC44 NXMciOFuEYT+qniQ+9OISM4mVRG6AADiu3hxHcl09ulvelT6XhupNd8OtQSMsrWftTAF U4Sxprg7s/EIoGID+dj27qrZvx3tSB5SrMikgC3YZVRhvN3TLlB64xFWMPyWR6ARuMyv jCPYPkJhGDu6OEg2uEYTL8lABkvwsAo+f22mn9Zl1X+yT2qVisRGcKrq1C0hiDSdliN+ 9EJVmE5M0Q9162p+SUtQsbRMJ7l6CMtBH5LRPFK1HXnrZaZJjLX2If/p/RUrFsV3PUYS UURg== 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 p126si1028008oib.73.2020.04.07.12.50.02; Tue, 07 Apr 2020 12:50:16 -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 S1726719AbgDGTta (ORCPT + 99 others); Tue, 7 Apr 2020 15:49:30 -0400 Received: from 7.mo178.mail-out.ovh.net ([46.105.58.91]:48525 "EHLO 7.mo178.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726773AbgDGTta (ORCPT ); Tue, 7 Apr 2020 15:49:30 -0400 X-Greylist: delayed 84363 seconds by postgrey-1.27 at vger.kernel.org; Tue, 07 Apr 2020 15:49:30 EDT Received: from player732.ha.ovh.net (unknown [10.108.42.73]) by mo178.mail-out.ovh.net (Postfix) with ESMTP id 3AF25999E3 for ; Tue, 7 Apr 2020 21:42:21 +0200 (CEST) Received: from labapart.com (mue-88-130-59-209.dsl.tropolys.de [88.130.59.209]) (Authenticated sender: olivier@labapart.com) by player732.ha.ovh.net (Postfix) with ESMTPSA id CEC33111814D3 for ; Tue, 7 Apr 2020 19:42:20 +0000 (UTC) Subject: Re: [PATCH BlueZ v2] emulator: Fix command line parameters with optional argument To: "linux-bluetooth@vger.kernel.org" References: <20200407194059.5734-1-olivier@labapart.com> From: Olivier MARTIN Message-ID: <167a95a1-38d1-9f1f-9556-7bd855c3fe81@labapart.com> Date: Tue, 7 Apr 2020 21:42:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200407194059.5734-1-olivier@labapart.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Ovh-Tracer-Id: 15536574291400945228 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrudehgddufeekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefqlhhivhhivghrucfoteftvffkpfcuoeholhhivhhivghrsehlrggsrghprghrthdrtghomheqnecukfhppedtrddtrddtrddtpdekkedrudeftddrheelrddvtdelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhpqdhouhhtpdhhvghlohepphhlrgihvghrjeefvddrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpeholhhivhhivghrsehlrggsrghprghrthdrtghomhdprhgtphhtthhopehlihhnuhigqdgslhhuvghtohhothhhsehvghgvrhdrkhgvrhhnvghlrdhorhhg Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Oops, some debug leftover. Please ignore this patch. On 07.04.20 21:40, Olivier Martin wrote: > Some parameters were missing the indication that additional > argument could be expected. > --- > btio/btio.c | 8 ++++++-- > emulator/main.c | 6 ++++-- > 2 files changed, 10 insertions(+), 4 deletions(-) > > diff --git a/btio/btio.c b/btio/btio.c > index e7b4db16b..56c59f84e 100644 > --- a/btio/btio.c > +++ b/btio/btio.c > @@ -1676,12 +1676,16 @@ GIOChannel *bt_io_connect(BtIOConnect connect, gpointer user_data, > ret = parse_set_opts(&opts, gerr, opt1, args); > va_end(args); > > - if (ret == FALSE) > + if (ret == FALSE) { > + fprintf(stderr, "bt_io_connect(type:%d) err1\n", opts.type); > return NULL; > + } > > io = create_io(FALSE, &opts, gerr); > - if (io == NULL) > + if (io == NULL) { > + fprintf(stderr, "bt_io_connect(type:%d) err2\n", opts.type); > return NULL; > + } > > sock = g_io_channel_unix_get_fd(io); > > 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;