mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
conf: rename virDomainLifecycleAction enum functions
Reviewed-by: John Ferlan <jferlan@redhat.com> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
21068580d6
commit
55c63295b2
@ -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",
|
||||
@ -18594,14 +18594,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",
|
||||
@ -25863,11 +25863,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",
|
||||
|
@ -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)
|
||||
|
@ -401,10 +401,10 @@ virDomainLeaseInsertPreAlloc;
|
||||
virDomainLeaseInsertPreAlloced;
|
||||
virDomainLeaseRemove;
|
||||
virDomainLeaseRemoveAt;
|
||||
virDomainLifecycleActionTypeFromString;
|
||||
virDomainLifecycleActionTypeToString;
|
||||
virDomainLifecycleCrashTypeFromString;
|
||||
virDomainLifecycleCrashTypeToString;
|
||||
virDomainLifecycleTypeFromString;
|
||||
virDomainLifecycleTypeToString;
|
||||
virDomainLoaderDefFree;
|
||||
virDomainLoaderTypeFromString;
|
||||
virDomainLoaderTypeToString;
|
||||
|
@ -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;
|
||||
|
@ -1240,7 +1240,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;
|
||||
@ -1251,7 +1251,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;
|
||||
@ -2209,14 +2209,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;
|
||||
|
Loading…
Reference in New Issue
Block a user