Re: [Qemu-devel] [PATCH 09/38] char: introduce CharBackend

2016-10-23 Thread Paolo Bonzini
On 22/10/2016 11:52, Marc-André Lureau wrote: > +assert(be); I feel a GNOME perturbation in the force. :D The assertion (unlike g_return_value_if_fail) is unnecessary, because you'd crash anyway eventually. Paolo > +return be->chr; > +} > + > +bool qemu_chr_fe_init(CharBackend *b, Cha

[Qemu-devel] [PATCH 09/38] char: introduce CharBackend

2016-10-22 Thread Marc-André Lureau
This new structure is meant to keep the details associated with a char driver usage. On initialization, it gets a tag from the mux backend. It can change its handlers thanks to qemu_chr_fe_set_handlers(). This structure is introduced so that all frontend will be moved to hold and use a CharBackend