[PATCH 02/14] conf: rename virDomainLifecycleAction enum functions

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

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 src/conf/domain_conf.c     | 10 +++++-----
 src/conf/domain_conf.h     |  2 +-
 src/libvirt_private.syms   |  4 ++--
 src/xenconfig/xen_common.c |  8 ++++----
 src/xenconfig/xen_sxpr.c   |  8 ++++----
 5 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index fe2c3a29b6..39a4c4d80f 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -208,7 +208,7 @@ VIR_ENUM_IMPL(virDomainCapsFeature, VIR_DOMAIN_CAPS_FEATURE_LAST,
               "syslog",
               "wake_alarm")
 
-VIR_ENUM_IMPL(virDomainLifecycle, VIR_DOMAIN_LIFECYCLE_ACTION_LAST,
+VIR_ENUM_IMPL(virDomainLifecycleAction, VIR_DOMAIN_LIFECYCLE_ACTION_LAST,
               "destroy",
               "restart",
               "rename-restart",
@@ -18584,14 +18584,14 @@ virDomainDefParseXML(xmlDocPtr xml,
                                      "string(./on_reboot[1])",
                                      &def->onReboot,
                                      VIR_DOMAIN_LIFECYCLE_ACTION_RESTART,
-                                     virDomainLifecycleTypeFromString) < 0)
+                                     virDomainLifecycleActionTypeFromString) < 0)
         goto error;
 
     if (virDomainEventActionParseXML(ctxt, "on_poweroff",
                                      "string(./on_poweroff[1])",
                                      &def->onPoweroff,
                                      VIR_DOMAIN_LIFECYCLE_ACTION_DESTROY,
-                                     virDomainLifecycleTypeFromString) < 0)
+                                     virDomainLifecycleActionTypeFromString) < 0)
         goto error;
 
     if (virDomainEventActionParseXML(ctxt, "on_crash",
@@ -25862,11 +25862,11 @@ virDomainDefFormatInternal(virDomainDefPtr def,
 
     if (virDomainEventActionDefFormat(buf, def->onPoweroff,
                                       "on_poweroff",
-                                      virDomainLifecycleTypeToString) < 0)
+                                      virDomainLifecycleActionTypeToString) < 0)
         goto error;
     if (virDomainEventActionDefFormat(buf, def->onReboot,
                                       "on_reboot",
-                                      virDomainLifecycleTypeToString) < 0)
+                                      virDomainLifecycleActionTypeToString) < 0)
         goto error;
     if (virDomainEventActionDefFormat(buf, def->onCrash,
                                       "on_crash",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 4a821fb0f2..a284a40f80 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -3211,7 +3211,7 @@ VIR_ENUM_DECL(virDomainBoot)
 VIR_ENUM_DECL(virDomainFeature)
 VIR_ENUM_DECL(virDomainCapabilitiesPolicy)
 VIR_ENUM_DECL(virDomainCapsFeature)
-VIR_ENUM_DECL(virDomainLifecycle)
+VIR_ENUM_DECL(virDomainLifecycleAction)
 VIR_ENUM_DECL(virDomainLifecycleCrash)
 VIR_ENUM_DECL(virDomainDevice)
 VIR_ENUM_DECL(virDomainDeviceAddress)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 4c56f17e29..1fef62a0cb 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -400,10 +400,10 @@ virDomainLeaseInsertPreAlloc;
 virDomainLeaseInsertPreAlloced;
 virDomainLeaseRemove;
 virDomainLeaseRemoveAt;
+virDomainLifecycleActionTypeFromString;
+virDomainLifecycleActionTypeToString;
 virDomainLifecycleCrashTypeFromString;
 virDomainLifecycleCrashTypeToString;
-virDomainLifecycleTypeFromString;
-virDomainLifecycleTypeToString;
 virDomainLoaderDefFree;
 virDomainLoaderTypeFromString;
 virDomainLoaderTypeToString;
diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c
index 6d7dc2cde4..a3b82c178e 100644
--- a/src/xenconfig/xen_common.c
+++ b/src/xenconfig/xen_common.c
@@ -361,7 +361,7 @@ xenParseEventsActions(virConfPtr conf, virDomainDefPtr def)
     if (xenConfigGetString(conf, "on_poweroff", &str, "destroy") < 0)
         return -1;
 
-    if ((def->onPoweroff = virDomainLifecycleTypeFromString(str)) < 0) {
+    if ((def->onPoweroff = virDomainLifecycleActionTypeFromString(str)) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("unexpected value %s for on_poweroff"), str);
         return -1;
@@ -370,7 +370,7 @@ xenParseEventsActions(virConfPtr conf, virDomainDefPtr def)
     if (xenConfigGetString(conf, "on_reboot", &str, "restart") < 0)
         return -1;
 
-    if ((def->onReboot = virDomainLifecycleTypeFromString(str)) < 0) {
+    if ((def->onReboot = virDomainLifecycleActionTypeFromString(str)) < 0) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("unexpected value %s for on_reboot"), str);
         return -1;
@@ -1449,7 +1449,7 @@ xenFormatEventActions(virConfPtr conf, virDomainDefPtr def)
 {
     const char *lifecycle = NULL;
 
-    if (!(lifecycle = virDomainLifecycleTypeToString(def->onPoweroff))) {
+    if (!(lifecycle = virDomainLifecycleActionTypeToString(def->onPoweroff))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("unexpected lifecycle action %d"), def->onPoweroff);
         return -1;
@@ -1458,7 +1458,7 @@ xenFormatEventActions(virConfPtr conf, virDomainDefPtr def)
         return -1;
 
 
-    if (!(lifecycle = virDomainLifecycleTypeToString(def->onReboot))) {
+    if (!(lifecycle = virDomainLifecycleActionTypeToString(def->onReboot))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("unexpected lifecycle action %d"), def->onReboot);
         return -1;
diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c
index cf62215e54..d26026fed2 100644
--- a/src/xenconfig/xen_sxpr.c
+++ b/src/xenconfig/xen_sxpr.c
@@ -1245,7 +1245,7 @@ xenParseSxpr(const struct sexpr *root,
 
     tmp = sexpr_node(root, "domain/on_poweroff");
     if (tmp != NULL) {
-        if ((def->onPoweroff = virDomainLifecycleTypeFromString(tmp)) < 0) {
+        if ((def->onPoweroff = virDomainLifecycleActionTypeFromString(tmp)) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("unknown lifecycle type %s"), tmp);
             goto error;
@@ -1256,7 +1256,7 @@ xenParseSxpr(const struct sexpr *root,
 
     tmp = sexpr_node(root, "domain/on_reboot");
     if (tmp != NULL) {
-        if ((def->onReboot = virDomainLifecycleTypeFromString(tmp)) < 0) {
+        if ((def->onReboot = virDomainLifecycleActionTypeFromString(tmp)) < 0) {
             virReportError(VIR_ERR_INTERNAL_ERROR,
                            _("unknown lifecycle type %s"), tmp);
             goto error;
@@ -2214,14 +2214,14 @@ xenFormatSxpr(virConnectPtr conn, virDomainDefPtr def)
             virBufferEscapeSexpr(&buf, "(bootloader_args '%s')", def->os.bootloaderArgs);
     }
 
-    if (!(tmp = virDomainLifecycleTypeToString(def->onPoweroff))) {
+    if (!(tmp = virDomainLifecycleActionTypeToString(def->onPoweroff))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("unexpected lifecycle value %d"), def->onPoweroff);
         goto error;
     }
     virBufferAsprintf(&buf, "(on_poweroff '%s')", tmp);
 
-    if (!(tmp = virDomainLifecycleTypeToString(def->onReboot))) {
+    if (!(tmp = virDomainLifecycleActionTypeToString(def->onReboot))) {
         virReportError(VIR_ERR_INTERNAL_ERROR,
                        _("unexpected lifecycle value %d"), def->onReboot);
         goto error;
-- 
2.13.6

--
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]
  Powered by Linux