linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Stotland, Inga" <inga.stotland@intel.com>
To: "luiz.dentz@gmail.com" <luiz.dentz@gmail.com>
Cc: "linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"Gix, Brian" <brian.gix@intel.com>
Subject: Re: [PATCH BlueZ 1/2] shared/shell: Add ell based shell implementation
Date: Wed, 7 Aug 2019 19:27:49 +0000	[thread overview]
Message-ID: <85b99cb25198769fe1455630e345266e657e86ad.camel@intel.com> (raw)
In-Reply-To: <CABBYNZJcQoowK5KVbwXys0WJf98-6A1WbkDKTXXZcwHkA759WA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]

Hi Luiz,

On Wed, 2019-08-07 at 14:18 +0300, Luiz Augusto von Dentz wrote:
> Hi Inga,
> 
> On Wed, Aug 7, 2019 at 9:47 AM Inga Stotland <inga.stotland@intel.com
> > wrote:
> > This adds the functionality of bt_shell that uses ell
> > mainloop.
> > "
> > +
> > +static void quit_on_timeout(struct l_timeout *timeout, void
> > *user_data)
> > +{
> > +       l_main_quit();
> > +}
> > +
> > +bool bt_shell_attach(int fd)
> > +{
> > +       struct l_io *io;
> > +
> > +       /* TODO: Allow more than one input? */
> > +       if (data.input)
> > +               return false;
> > +
> > +       io = l_io_new(fd);
> > +
> > +       if (!data.mode)
> > +               l_io_set_read_handler(io, input_read, NULL, NULL);
> > +
> > +       l_io_set_disconnect_handler(io, io_hup, NULL, NULL);
> 
> There is an io abstraction to implement this, afaik most of the
> things
> here are just copy+paste of shell.c just with a different mainloop
> and
> IO while the io.h and mainloop.h are exactly to abstract these so I
> wonder why you took this alternative.
> 

True. Much easier to add ell-based mainloop.c, same effect and
lightweight.

Regards,
Inga


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3265 bytes --]

  reply	other threads:[~2019-08-07 19:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07  6:47 [PATCH BlueZ 0/2] ELL-based bt_shell implementation Inga Stotland
2019-08-07  6:47 ` [PATCH BlueZ 1/2] shared/shell: Add ell based shell implementation Inga Stotland
2019-08-07 11:18   ` Luiz Augusto von Dentz
2019-08-07 19:27     ` Stotland, Inga [this message]
2019-08-07  6:47 ` [PATCH BlueZ 2/2] shared/shell: Add "clear-history" API Inga Stotland

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=85b99cb25198769fe1455630e345266e657e86ad.camel@intel.com \
    --to=inga.stotland@intel.com \
    --cc=brian.gix@intel.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).