Re: [Qemu-devel] [PATCH for 2.8 3/3] sdl: Modularize

2016-08-01 Thread Fam Zheng
On Mon, 08/01 12:31, Paolo Bonzini wrote: > > + > > +static void sdl_init_fn(void) > > +{ > > +sdl_register_init_fun(sdl_display_init_do); > > +} > > + > > +sdl_init(sdl_init_fn); > > Can you use __attribute__((constructor)) instead of going through the > burden of defining a new type? The re

Re: [Qemu-devel] [PATCH for 2.8 3/3] sdl: Modularize

2016-08-01 Thread Fam Zheng
On Mon, 08/01 13:53, Gerd Hoffmann wrote: > On Mi, 2016-07-27 at 14:26 +0800, Fam Zheng wrote: > > Signed-off-by: Fam Zheng > > more verbose commit message please, especially for those (like me) who > have not worked yet with modules. Yeah, my bad. Maybe I should have put RFC to the subject too.

Re: [Qemu-devel] [PATCH for 2.8 3/3] sdl: Modularize

2016-08-01 Thread Gerd Hoffmann
On Mi, 2016-07-27 at 14:26 +0800, Fam Zheng wrote: > Signed-off-by: Fam Zheng more verbose commit message please, especially for those (like me) who have not worked yet with modules. Will sdl be loaded unconditionally? Or only with -display sdl? What happens if the module is not present? The ma

Re: [Qemu-devel] [PATCH for 2.8 3/3] sdl: Modularize

2016-08-01 Thread Daniel P. Berrange
On Wed, Jul 27, 2016 at 02:26:17PM +0800, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > Makefile.objs | 1 + > configure | 4 +-- > include/qemu/module.h | 2 ++ > include/ui/console.h | 5 ++-- > ui/Makefile.objs | 2 ++ > ui/sdl-init.c | 75 > ++

Re: [Qemu-devel] [PATCH for 2.8 3/3] sdl: Modularize

2016-08-01 Thread Paolo Bonzini
On 28/07/2016 07:17, Fam Zheng wrote: > On Wed, 07/27 19:23, Colin Lord wrote: >> On 07/27/2016 02:26 AM, Fam Zheng wrote: >>> Signed-off-by: Fam Zheng >>> --- >>> Makefile.objs | 1 + >>> configure | 4 +-- >>> include/qemu/module.h | 2 ++ >>> include/ui/console.h | 5

Re: [Qemu-devel] [PATCH for 2.8 3/3] sdl: Modularize

2016-08-01 Thread Paolo Bonzini
On 27/07/2016 08:26, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > Makefile.objs | 1 + > configure | 4 +-- > include/qemu/module.h | 2 ++ > include/ui/console.h | 5 ++-- > ui/Makefile.objs | 2 ++ > ui/sdl-init.c | 75 > +

Re: [Qemu-devel] [PATCH for 2.8 3/3] sdl: Modularize

2016-07-28 Thread Fam Zheng
On Thu, 07/28 13:17, Fam Zheng wrote: > > Maybe I'm doing something wrong, but when I apply this third patch > > (along with the first two) to master it doesn't seem to build when > > modules are enabled in the configuration: > > > > LINK x86_64-softmmu/qemu-system-x86_64 > > ../backends/baum.o

Re: [Qemu-devel] [PATCH for 2.8 3/3] sdl: Modularize

2016-07-27 Thread Fam Zheng
On Wed, 07/27 19:23, Colin Lord wrote: > On 07/27/2016 02:26 AM, Fam Zheng wrote: > > Signed-off-by: Fam Zheng > > --- > > Makefile.objs | 1 + > > configure | 4 +-- > > include/qemu/module.h | 2 ++ > > include/ui/console.h | 5 ++-- > > ui/Makefile.objs | 2 ++ >

Re: [Qemu-devel] [PATCH for 2.8 3/3] sdl: Modularize

2016-07-27 Thread Colin Lord
On 07/27/2016 02:26 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > Makefile.objs | 1 + > configure | 4 +-- > include/qemu/module.h | 2 ++ > include/ui/console.h | 5 ++-- > ui/Makefile.objs | 2 ++ > ui/sdl-init.c | 75 >

[Qemu-devel] [PATCH for 2.8 3/3] sdl: Modularize

2016-07-26 Thread Fam Zheng
Signed-off-by: Fam Zheng --- Makefile.objs | 1 + configure | 4 +-- include/qemu/module.h | 2 ++ include/ui/console.h | 5 ++-- ui/Makefile.objs | 2 ++ ui/sdl-init.c | 75 +++ ui/sdl.c | 19