Re: [PATCH 1/8] virDomainGetState public API

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

 



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
--
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]