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

Re: [libvirt] [PATCH v2 1/6] Add flags for virDomainOpenConsole



On Tue, Dec 13, 2011 at 05:03:05PM -0700, Eric Blake wrote:
> On 12/07/2011 11:08 AM, Peter Krempa wrote:
> > This patch adds a set of flags to be used with the virDomainOpenConsole
> > API call to specify if the user wishes to interrupt an existing console
> > session or just to try open a new one.
> > 
> > VIR_DOMAIN_CONSOLE_TRY - specifies that the caller wants to try open a
> >                          new console session if no open sessions exist
> > 
> > VIR_DOMAIN_CONSOLE_FORCE - specifies that the caller wishes to interrupt
> >                            existing session and force a creation of a
> >                            new one.
> > ---
> >  include/libvirt/libvirt.h.in |   12 +++++++++++-
> >  1 files changed, 11 insertions(+), 1 deletions(-)
> > 
> > diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> > index 2480add..268326b 100644
> > --- a/include/libvirt/libvirt.h.in
> > +++ b/include/libvirt/libvirt.h.in
> > @@ -3346,7 +3346,17 @@ int                     virNWFilterGetUUIDString (virNWFilterPtr nwfilter,
> >                                                    char *buf);
> >  char *                  virNWFilterGetXMLDesc    (virNWFilterPtr nwfilter,
> >                                                    unsigned int flags);
> > -
> > +/**
> > + * virDomainConsoleFlags
> > + *
> > + * Since 0.9.7
> 
> 0.9.9
> 
> (hmm, it would be really nice if we could augment
> http://libvirt.org/hvsupport.html to also list when a hypervisor started
> supporting a specific flag, rather than just the generic API).
> 
> > + */
> > +typedef enum {
> > +    VIR_DOMAIN_CONSOLE_TRY = 0,  /* try to open the console, don't abort active
> > +                                    connection */
> 
> Since the default is 0, do we really need to name this flag?  Then
> again, I guess it doesn't hurt.

In some ways it does actally hurt, because it can be confusing
that 'flags & VIR_DOMAIN_CONSOLE_TRY' evaluates to false, so I
would leave it out.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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