From: Johan Hedberg <johan.hedberg@gmail.com>
To: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
Cc: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 3/4] tools/obexctl: Use bt_shell helpers
Date: Wed, 6 Dec 2017 08:51:19 +0200 [thread overview]
Message-ID: <20171206065119.GA10541@x1c.home> (raw)
In-Reply-To: <fb1a7761-4b4a-a647-d9f9-ab9634eb1266@jp.fujitsu.com>
Hi,
On Wed, Dec 06, 2017, ERAMOTO Masaya wrote:
> On 12/06/2017 03:33 AM, Luiz Augusto von Dentz wrote:
> > This makes obexctl use bt_shell to manage the menus and command
> > handling.
> > ---
> > Makefile.tools | 5 +-
> > tools/obexctl.c | 609 ++++++++++++++++----------------------------------------
> > 2 files changed, 175 insertions(+), 439 deletions(-)
>
> The previous obexctl gives arguments included a command name to the command, but
> bt_shell gives arguments excluded a command name. So you should fix argc/argv
> related processes in each command. Also bt_shell automatically checks passed
> arguments.
> You can refer to the attached patch about these things.
If you ask me, I think we should keep this consistent with obexctl and
e.g. how main() gets called. I.e. argv[0] is the command. An added
benefit of this is that two very similar commands (taking the same
parameters) can use the same command handler, since they'll be able to
distuinguish which command was used.
Johan
next prev parent reply other threads:[~2017-12-06 6:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 18:33 [PATCH BlueZ 1/4] shared/shell: Omit menu command if there are no submenus Luiz Augusto von Dentz
2017-12-05 18:33 ` [PATCH BlueZ 2/4] mesh: Make meshctl use bt_shell helpers Luiz Augusto von Dentz
2017-12-05 18:33 ` [PATCH BlueZ 3/4] tools/obexctl: Use " Luiz Augusto von Dentz
2017-12-06 2:48 ` ERAMOTO Masaya
2017-12-06 6:51 ` Johan Hedberg [this message]
2017-12-06 12:15 ` Luiz Augusto von Dentz
2017-12-05 18:33 ` [PATCH BlueZ 4/4] tools/bluetooth-player: " Luiz Augusto von Dentz
2017-12-06 3:00 ` ERAMOTO Masaya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171206065119.GA10541@x1c.home \
--to=johan.hedberg@gmail.com \
--cc=eramoto.masaya@jp.fujitsu.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).