Re: [libvirt] [PATCH v2] libxl: Implement basic video device selection

2014-04-04 Thread Daniel P. Berrange
On Fri, Apr 04, 2014 at 03:36:38PM +0200, Stefan Bader wrote: > On 04.04.2014 15:17, Daniel P. Berrange wrote: > > On Fri, Apr 04, 2014 at 11:36:39AM +0200, Stefan Bader wrote: > >> +static int > >> +libxlSetBuildGraphics(virDomainDefPtr def, libxl_domain_config *d_config) > >> +{ > >> +libxl_d

Re: [libvirt] [PATCH v2] libxl: Implement basic video device selection

2014-04-04 Thread Stefan Bader
On 04.04.2014 15:17, Daniel P. Berrange wrote: > On Fri, Apr 04, 2014 at 11:36:39AM +0200, Stefan Bader wrote: >> +static int >> +libxlSetBuildGraphics(virDomainDefPtr def, libxl_domain_config *d_config) >> +{ >> +libxl_domain_build_info *b_info = &d_config->b_info; >> + >> +/* >> + * T

Re: [libvirt] [PATCH v2] libxl: Implement basic video device selection

2014-04-04 Thread Daniel P. Berrange
On Fri, Apr 04, 2014 at 11:36:39AM +0200, Stefan Bader wrote: > +static int > +libxlSetBuildGraphics(virDomainDefPtr def, libxl_domain_config *d_config) > +{ > +libxl_domain_build_info *b_info = &d_config->b_info; > + > +/* > + * Take the first defined video device (graphics card) to di

Re: [libvirt] [PATCH v2] libxl: Implement basic video device selection

2014-04-04 Thread Stefan Bader
On 04.04.2014 14:56, Ian Campbell wrote: > On Fri, 2014-04-04 at 14:51 +0200, Daniel P. Berrange wrote: >> On Fri, Apr 04, 2014 at 11:34:17AM +0100, Ian Campbell wrote: >>> On Fri, 2014-04-04 at 12:31 +0200, Stefan Bader wrote: On 04.04.2014 11:48, Ian Campbell wrote: > On Fri, 2014-04-04

Re: [libvirt] [PATCH v2] libxl: Implement basic video device selection

2014-04-04 Thread Daniel P. Berrange
On Fri, Apr 04, 2014 at 01:56:09PM +0100, Ian Campbell wrote: > On Fri, 2014-04-04 at 14:51 +0200, Daniel P. Berrange wrote: > > On Fri, Apr 04, 2014 at 11:34:17AM +0100, Ian Campbell wrote: > > > On Fri, 2014-04-04 at 12:31 +0200, Stefan Bader wrote: > > > > On 04.04.2014 11:48, Ian Campbell wrote

Re: [libvirt] [PATCH v2] libxl: Implement basic video device selection

2014-04-04 Thread Ian Campbell
On Fri, 2014-04-04 at 14:51 +0200, Daniel P. Berrange wrote: > On Fri, Apr 04, 2014 at 11:34:17AM +0100, Ian Campbell wrote: > > On Fri, 2014-04-04 at 12:31 +0200, Stefan Bader wrote: > > > On 04.04.2014 11:48, Ian Campbell wrote: > > > > On Fri, 2014-04-04 at 11:36 +0200, Stefan Bader wrote: > > >

Re: [libvirt] [PATCH v2] libxl: Implement basic video device selection

2014-04-04 Thread Daniel P. Berrange
On Fri, Apr 04, 2014 at 11:34:17AM +0100, Ian Campbell wrote: > On Fri, 2014-04-04 at 12:31 +0200, Stefan Bader wrote: > > On 04.04.2014 11:48, Ian Campbell wrote: > > > On Fri, 2014-04-04 at 11:36 +0200, Stefan Bader wrote: > > >> +/* > > >> + * Take the first defined video device (graphic

Re: [libvirt] [PATCH v2] libxl: Implement basic video device selection

2014-04-04 Thread Stefan Bader
On 04.04.2014 12:34, Ian Campbell wrote: > On Fri, 2014-04-04 at 12:31 +0200, Stefan Bader wrote: >> On 04.04.2014 11:48, Ian Campbell wrote: >>> On Fri, 2014-04-04 at 11:36 +0200, Stefan Bader wrote: +/* + * Take the first defined video device (graphics card) to display +

Re: [libvirt] [PATCH v2] libxl: Implement basic video device selection

2014-04-04 Thread Ian Campbell
On Fri, 2014-04-04 at 12:31 +0200, Stefan Bader wrote: > On 04.04.2014 11:48, Ian Campbell wrote: > > On Fri, 2014-04-04 at 11:36 +0200, Stefan Bader wrote: > >> +/* > >> + * Take the first defined video device (graphics card) to display > >> + * on the first graphics device (display).

Re: [libvirt] [PATCH v2] libxl: Implement basic video device selection

2014-04-04 Thread Stefan Bader
On 04.04.2014 11:48, Ian Campbell wrote: > On Fri, 2014-04-04 at 11:36 +0200, Stefan Bader wrote: >> +/* >> + * Take the first defined video device (graphics card) to display >> + * on the first graphics device (display). >> + * Right now only type and vram info is used and anything

Re: [libvirt] [PATCH v2] libxl: Implement basic video device selection

2014-04-04 Thread Ian Campbell
On Fri, 2014-04-04 at 11:36 +0200, Stefan Bader wrote: > +/* > + * Take the first defined video device (graphics card) to display > + * on the first graphics device (display). > + * Right now only type and vram info is used and anything beside > + * type xen and vga is mapped to

[libvirt] [PATCH v2] libxl: Implement basic video device selection

2014-04-04 Thread Stefan Bader
Ok, I think indentation should be ok like that and I added error handling for VIR_STRDUP. I think just returning -1 like the other places should be ok as the only caller looks to handle the disposal of the config structure. -Stefan --- >From dfe579003e91137ecd824d2a08bcdc8f18725857 Mon Sep 17 00