Re: [libvirt] [PATCH 01/14] Add XML flag for internal domain status

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

 



On Mon, 2009-07-20 at 14:18 +0200, Daniel Veillard wrote:
> > diff --git a/src/libvirt.c b/src/libvirt.c
> > index f4a7fa7..c8926b3 100644
> > --- a/src/libvirt.c
> > +++ b/src/libvirt.c
> > @@ -2730,6 +2730,12 @@ virDomainGetXMLDesc(virDomainPtr domain, int flags)
> >          goto error;
> >      }
> >  
> > +    if (flags & VIR_DOMAIN_XML_INTERNAL_STATUS) {
> > +        virLibConnError(conn, VIR_ERR_OPERATION_DENIED,
> > +                        _("virDomainGetXMLDesc with internal status flag"));
> > +        goto error;
> > +    }
> > +
> >      if (conn->driver->domainDumpXML) {
> >          char *ret;
> >          ret = conn->driver->domainDumpXML (domain, flags);
> 
>   Hum, that's very confusing. Why expose that flag at the API level
> but forbid it's use from the API ?

That's a fair point - I used a flag because it has a similar meaning to
the other two flags, but you're right that we don't want to expose that
semantic.

>   Seems to me adding an extra parameter to the internal function
> virDomainDefParseXML() is a far cleaner way to do things by looking at
> this patch.

We'd have to propagate the parameter around quite a number of places.
How about we reserve bits 24-31 for internal flags and declare the flag
in an internal header?

Cheers,
Mark.

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]