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

Re: [Xen-devel] [PATCH v4 28/32] libxl_qmp: Store advertised QEMU version in libxl__ev_qmp



On Thu, Aug 02, 2018 at 05:08:15PM +0200, Roger Pau Monné wrote:
> On Fri, Jul 27, 2018 at 03:06:10PM +0100, Anthony PERARD wrote:
> > This will be used in a later patch.
> > 
> > Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> > ---
> >  tools/libxl/libxl_internal.h |  7 +++++++
> >  tools/libxl/libxl_qmp.c      | 16 ++++++++++++++++
> >  2 files changed, 23 insertions(+)
> > 
> > diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> > index 01c3868748..4fa54cdb6a 100644
> > --- a/tools/libxl/libxl_internal.h
> > +++ b/tools/libxl/libxl_internal.h
> > @@ -432,6 +432,13 @@ struct libxl__ev_qmp {
> >      libxl__ev_qmp_callback *callback;
> >      libxl__carefd *cfd; /* set to send a fd with the command, NULL 
> > otherwise */
> >  
> > +    /* read-only when Connected */
> > +    struct {
> > +        int major;
> > +        int minor;
> > +        int micro;
> > +    } qemu_version;
> 
> I would init those field to some bogus value (-1) to make sure an use
> before initialization will more likely cause a failure.

I don't think it matter, but I'll do it in libxl__ev_qmp_init.
(Those field should not be read before they have been written.)

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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