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

Re: [Xen-devel] [xen-unstable test] 12132: regressions - FAIL



On Fri, 2012-03-02 at 12:15 +0000, Stefano Stabellini wrote:
> On Fri, 2 Mar 2012, Ian Campbell wrote:
> > # HG changeset patch
> > # User Ian Campbell <ian.campbell@xxxxxxxxxx>
> > # Date 1330678988 0
> > # Node ID 892bc1242d45b0a532b78833b633c68fc64a2906
> > # Parent  94eddab0b7cc2a0a4da71275efeea3a0962c125b
> > libxl: only set b_info->u.hvm.bios if type if HVM
> > 
> > This fixes a PV guest breakage causes by 24932:6eac4a1ee646 "libxl: Select 
> > BIOS
> > using libxl_domain_build_info_setdefaults".
> > 
> > I have also included a sanity check on b_info->type.
> > 
> > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > 
> > diff -r 94eddab0b7cc -r 892bc1242d45 tools/libxl/libxl_create.c
> > --- a/tools/libxl/libxl_create.c    Thu Mar 01 14:49:58 2012 +0000
> > +++ b/tools/libxl/libxl_create.c    Fri Mar 02 09:03:08 2012 +0000
> > @@ -74,28 +74,33 @@ int libxl__domain_create_info_setdefault
> >  int libxl__domain_build_info_setdefault(libxl__gc *gc,
> >                                          libxl_domain_build_info *b_info)
> >  {
> > +    if (!b_info->type || b_info->type == -1)
> > +        return ERROR_INVAL;
> 
> Maybe the check should be:
> 
>     if (b_info->type != LIBXL_DOMAIN_TYPE_HVM &&
>             b_info->type != LIBXL_DOMAIN_TYPE_PV)
>         return ERROR_INVAL;
> 
> to make it more obvious that is a sanity check on an enum, rather than
> an int.

Yes, that sounds like a good idea.

> The rest is fine.

Thanks, I'll make the above change and commit with your ack.

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.