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

[libvirt] [PATCH] Remove VIR_DOMAIN_SHUTDOWN_CRASHED from public API



From: "Daniel P. Berrange" <berrange redhat com>

The VIR_DOMAIN_SHUTDOWN_CRASHED state constant does not appear
to be used in the QEMU code anyway. It also doesn't make much
(any) sense, since the 'shutdown' state is a transient state
between 'running' and 'shutoff' which is only used by the Xen
driver.

It was added in commit 14e7e0ae8db9843aea80245a3d9e6cf5f2ef720d
which post-dates v1.1.0, so is safe to remove before 1.1.1

Signed-off-by: Daniel P. Berrange <berrange redhat com>
---
 include/libvirt/libvirt.h.in | 1 -
 src/conf/domain_conf.c       | 3 +--
 tools/virsh-domain-monitor.c | 2 --
 3 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index c0eb25b..4eae7bf 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -191,7 +191,6 @@ typedef enum {
 typedef enum {
     VIR_DOMAIN_SHUTDOWN_UNKNOWN = 0,    /* the reason is unknown */
     VIR_DOMAIN_SHUTDOWN_USER = 1,       /* shutting down on user request */
-    VIR_DOMAIN_SHUTDOWN_CRASHED = 2,    /* domain crashed */
 
 #ifdef VIR_ENUM_SENTINELS
     VIR_DOMAIN_SHUTDOWN_LAST
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index a86be8c..783df96 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -667,8 +667,7 @@ VIR_ENUM_IMPL(virDomainPausedReason, VIR_DOMAIN_PAUSED_LAST,
 
 VIR_ENUM_IMPL(virDomainShutdownReason, VIR_DOMAIN_SHUTDOWN_LAST,
               "unknown",
-              "user",
-              "crashed")
+              "user")
 
 VIR_ENUM_IMPL(virDomainShutoffReason, VIR_DOMAIN_SHUTOFF_LAST,
               "unknown",
diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 773f96d..98fe7fe 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -240,8 +240,6 @@ vshDomainStateReasonToString(int state, int reason)
         switch ((virDomainShutdownReason) reason) {
         case VIR_DOMAIN_SHUTDOWN_USER:
             return N_("user");
-        case VIR_DOMAIN_SHUTDOWN_CRASHED:
-            return N_("crashed");
         case VIR_DOMAIN_SHUTDOWN_UNKNOWN:
         case VIR_DOMAIN_SHUTDOWN_LAST:
             ;
-- 
1.8.1.4


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