Re: [PATCH BlueZ 1/2] shared/shell: Add ell based shell implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx
> > 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: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux