[libvirt] [PATCH 06/10] Add flags for virDomainOpenConsole

Peter Krempa pkrempa at redhat.com
Wed Oct 12 13:43:16 UTC 2011


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 c991dfc..ae31601 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -3093,7 +3093,17 @@ int                     virNWFilterGetUUIDString (virNWFilterPtr nwfilter,
                                                   char *buf);
 char *                  virNWFilterGetXMLDesc    (virNWFilterPtr nwfilter,
                                                   unsigned int flags);
-
+/**
+ * virDomainConsoleFlags
+ *
+ * Since 0.9.7
+ */
+typedef enum {
+    VIR_DOMAIN_CONSOLE_TRY = 0,  /* try to open the console, don't abort active
+                                    connection */
+    VIR_DOMAIN_CONSOLE_FORCE     /* abort a (possibly) active console connection
+                                    to force a new connection*/
+} virDomainConsoleFlags;

 int virDomainOpenConsole(virDomainPtr dom,
                          const char *devname,
-- 
1.7.3.4




More information about the libvir-list mailing list