mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
Rename VIR_DOMAIN_PAUSED_GUEST_PANICKED to VIR_DOMAIN_PAUSED_CRASHED
The VIR_DOMAIN_PAUSED_GUEST_PANICKED constant is badly named, leaking the QEMU event name. Elsewhere in the API we use 'CRASHED' rather than 'PANICKED', and the addition of 'GUEST' is redundant since all events are guest related. Thus rename it to VIR_DOMAIN_PAUSED_CRASHED, which matches with VIR_DOMAIN_RUNNING_CRASHED and VIR_DOMAIN_EVENT_CRASHED. It was added in commit 14e7e0ae8db9843aea80245a3d9e6cf5f2ef720d which post-dates v1.1.0, so is safe to rename before 1.1.1 Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
8c20d3f8e7
commit
63d261f395
@ -181,7 +181,7 @@ typedef enum {
|
||||
VIR_DOMAIN_PAUSED_FROM_SNAPSHOT = 7, /* paused after restoring from snapshot */
|
||||
VIR_DOMAIN_PAUSED_SHUTTING_DOWN = 8, /* paused during shutdown process */
|
||||
VIR_DOMAIN_PAUSED_SNAPSHOT = 9, /* paused while creating a snapshot */
|
||||
VIR_DOMAIN_PAUSED_GUEST_PANICKED = 10, /* paused due to a guest panicked event */
|
||||
VIR_DOMAIN_PAUSED_CRASHED = 10, /* paused due to a guest crash */
|
||||
|
||||
#ifdef VIR_ENUM_SENTINELS
|
||||
VIR_DOMAIN_PAUSED_LAST
|
||||
|
@ -3335,7 +3335,7 @@ int qemuMonitorVMStatusToPausedReason(const char *status)
|
||||
return VIR_DOMAIN_PAUSED_WATCHDOG;
|
||||
|
||||
case QEMU_MONITOR_VM_STATUS_GUEST_PANICKED:
|
||||
return VIR_DOMAIN_PAUSED_GUEST_PANICKED;
|
||||
return VIR_DOMAIN_PAUSED_CRASHED;
|
||||
|
||||
/* unreachable from this point on */
|
||||
case QEMU_MONITOR_VM_STATUS_LAST:
|
||||
|
@ -2724,7 +2724,7 @@ qemuProcessUpdateState(virQEMUDriverPtr driver, virDomainObjPtr vm)
|
||||
newState = VIR_DOMAIN_SHUTDOWN;
|
||||
newReason = VIR_DOMAIN_SHUTDOWN_UNKNOWN;
|
||||
ignore_value(VIR_STRDUP_QUIET(msg, "shutdown"));
|
||||
} else if (reason == VIR_DOMAIN_PAUSED_GUEST_PANICKED) {
|
||||
} else if (reason == VIR_DOMAIN_PAUSED_CRASHED) {
|
||||
newState = VIR_DOMAIN_CRASHED;
|
||||
newReason = VIR_DOMAIN_CRASHED_PANICKED;
|
||||
ignore_value(VIR_STRDUP_QUIET(msg, "crashed"));
|
||||
|
@ -228,8 +228,8 @@ vshDomainStateReasonToString(int state, int reason)
|
||||
return N_("shutting down");
|
||||
case VIR_DOMAIN_PAUSED_SNAPSHOT:
|
||||
return N_("creating snapshot");
|
||||
case VIR_DOMAIN_PAUSED_GUEST_PANICKED:
|
||||
return N_("guest panicked");
|
||||
case VIR_DOMAIN_PAUSED_CRASHED:
|
||||
return N_("crashed");
|
||||
case VIR_DOMAIN_PAUSED_UNKNOWN:
|
||||
case VIR_DOMAIN_PAUSED_LAST:
|
||||
;
|
||||
|
Loading…
x
Reference in New Issue
Block a user