Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp755581ybz; Wed, 15 Apr 2020 18:15:23 -0700 (PDT) X-Google-Smtp-Source: APiQypIcAOeZI3cSzXM51M6EoueiLTZqoPWQgNre0bQYqZgu+OZ5i05l91+92wn01gjeyFMCSgAV X-Received: by 2002:a17:907:4420:: with SMTP id om24mr7032926ejb.99.1586999722837; Wed, 15 Apr 2020 18:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586999722; cv=none; d=google.com; s=arc-20160816; b=s8T7JVFsqUA8Eat4/s7cyszltUj5DNNeB6OawenN/lYZVNnfNqrLP8mAzbGwtVUFpO QV9dAeVgvH40ZbEkyIzNM9bVhDxT9ZzHBCtvR7IITBj7A8C+CZwtuXxejapsESqaRlum 2g2UhT8Ml6ww+q8sXE6CE6RbWa6+6r147PaYXszR4mjGUt9gotnLa/LQLx1nNM88zpPY ln6lFIeFGTI71eKPbKOH7alYDQR1GlhdFKPHhq0yd7Pxl/Z5epfz53UmnfWx4gK12tY3 ivVzLvN29uRaklPLI4lUYqCFF2xDYfkfImwUTCx7BUDsRW95CtxczRoAJspPJDCa1HPP 4A4g== 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:cc:to:subject; bh=KuYpmbVXEwtcsgm5cGtRz5f9zVP1Rq+UmOnNdCzZGxU=; b=jhGmJrlFrP3tif66fE6MvWBopVChq/D5R6CLW5LvDyj/w5yv3nY6znmtN9rlVWKsLv HerN0wHzhQAdqalTwySVK7t1FkR/8KZPyaVVn5RvTpeZQkkHx7bHk74rYK4ickOFl+68 ttexVz0xpL2XWJ/BWxaNefH5rmiKQdmk7xZWxO1QxB4ZBYykr/n7xr78DhAlWJwN86KF hvYU077Oz+q4mEKPmqLHPvdpy90VdcksL8c347qXGCz6VqX51G/RyYTGcb0Ty6L7uWZR 5bJLOo7Sm6M1n32gl8LBE8kmPPZ5tjLeyTiBNcAk8IHCh5MPeS+VjXTzeKgTbxxvffv7 ZC4g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bf6si7876989edb.316.2020.04.15.18.14.58; Wed, 15 Apr 2020 18:15:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730472AbgDOX7F (ORCPT + 99 others); Wed, 15 Apr 2020 19:59:05 -0400 Received: from 16.mo1.mail-out.ovh.net ([178.33.104.224]:48617 "EHLO 16.mo1.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730005AbgDOX7E (ORCPT ); Wed, 15 Apr 2020 19:59:04 -0400 X-Greylist: delayed 3600 seconds by postgrey-1.27 at vger.kernel.org; Wed, 15 Apr 2020 19:59:02 EDT Received: from player718.ha.ovh.net (unknown [10.108.54.52]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id E01F01BB1AD for ; Thu, 16 Apr 2020 00:43:15 +0200 (CEST) Received: from labapart.com (i59F67A8C.versanet.de [89.246.122.140]) (Authenticated sender: olivier@labapart.com) by player718.ha.ovh.net (Postfix) with ESMTPSA id 346E01158B3BB; Wed, 15 Apr 2020 22:43:14 +0000 (UTC) Subject: Re: [PATCH BlueZ v2] emulator: Fix command line parameters with optional argument To: Luiz Augusto von Dentz Cc: "linux-bluetooth@vger.kernel.org" References: <20200407194059.5734-1-olivier@labapart.com> <167a95a1-38d1-9f1f-9556-7bd855c3fe81@labapart.com> From: Olivier MARTIN Message-ID: <9c2df62b-a864-7f85-bca9-ba3cd3de6669@labapart.com> Date: Thu, 16 Apr 2020 00:43:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Ovh-Tracer-Id: 10233022782472482380 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduhedrfeeggdduvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpefqlhhivhhivghrucfoteftvffkpfcuoeholhhivhhivghrsehlrggsrghprghrthdrtghomheqnecuffhomhgrihhnpehsphhinhhitghsrdhnvghtnecukfhppedtrddtrddtrddtpdekledrvdegiedruddvvddrudegtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrhejudekrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepohhlihhvihgvrheslhgrsggrphgrrhhtrdgtohhmpdhrtghpthhtoheplhhinhhugidqsghluhgvthhoohhthhesvhhgvghrrdhkvghrnhgvlhdrohhrgh Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Luiz, I sent the update directly after my email. See: https://www.spinics.net/lists/linux-bluetooth/msg84386.html Olivier On 16.04.20 00:40, Luiz Augusto von Dentz wrote: > Hi Olivier, > > On Tue, Apr 7, 2020 at 12:51 PM Olivier MARTIN wrote: >> Oops, some debug leftover. Please ignore this patch. > Are you still planning on sending an update for this one? > >> 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; > >