[libvirt] [PATCH 1/8] virDomainGetState public API
Jiri Denemark
jdenemar at redhat.com
Thu May 5 13:33:38 UTC 2011
On Wed, May 04, 2011 at 10:45:33 -0600, Eric Blake wrote:
> On 05/04/2011 08:45 AM, Jiri Denemark wrote:
> > This API is supposed to replace virDomainGetInfo when the only purpose
> > of calling it is getting current domain status.
> > @@ -674,6 +726,9 @@ int virDomainCoreDump (virDomainPtr domain,
> > */
> > int virDomainGetInfo (virDomainPtr domain,
> > virDomainInfoPtr info);
> > +int virDomainGetState (virDomainPtr domain,
> > + int *state,
> > + int *reason);
>
> Definitely add the unsigned int flags argument. I'm not sure yet
> whether we want to pass a struct instead of two int* arguments; if
> nothing else, a flag could let us treat the argument as a union of
> different structs, and return a different struct of information
> according to which flag was requested.
Hmm, this sounds like a bad design to me. If we need to return different
struct, we should create a new API for that.
> > +++ b/src/libvirt_public.syms
> > @@ -436,4 +436,9 @@ LIBVIRT_0.9.0 {
> > virStorageVolUpload;
> > } LIBVIRT_0.8.8;
> >
> > +LIBVIRT_0.9.1 {
>
> 0.9.2
Ah, sure.
Jirka
More information about the libvir-list
mailing list