|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 4/6] runstate: simplify qemu_shutdown_requested_get()
The only caller needs to know whether a shutdown request is pending,
not its reason. Return bool and rename the function to
qemu_shutdown_requested().
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@xxxxxxxxxxxxxx>
---
hw/xen/xen-hvm-common.c | 2 +-
include/system/runstate.h | 2 +-
system/runstate.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c
index 62d88804c43..4d01a12062d 100644
--- a/hw/xen/xen-hvm-common.c
+++ b/hw/xen/xen-hvm-common.c
@@ -610,7 +610,7 @@ static void cpu_handle_ioreq(void *opaque)
if (runstate_is_running()) {
ShutdownCause request;
- if (qemu_shutdown_requested_get()) {
+ if (qemu_shutdown_requested()) {
destroy_hvm_domain(false);
}
request = qemu_reset_requested_get();
diff --git a/include/system/runstate.h b/include/system/runstate.h
index 929379adae4..3ed35921bb7 100644
--- a/include/system/runstate.h
+++ b/include/system/runstate.h
@@ -146,7 +146,7 @@ void qemu_system_debug_request(void);
void qemu_system_vmstop_request(RunState reason);
void qemu_system_vmstop_request_prepare(void);
bool qemu_vmstop_requested(RunState *r);
-ShutdownCause qemu_shutdown_requested_get(void);
+bool qemu_shutdown_requested(void);
bool qemu_force_shutdown_requested(void);
ShutdownCause qemu_reset_requested_get(void);
void qemu_system_killed(int signal, pid_t pid);
diff --git a/system/runstate.c b/system/runstate.c
index 01f936649b4..2b28e2a30e2 100644
--- a/system/runstate.c
+++ b/system/runstate.c
@@ -582,7 +582,7 @@ static NotifierList shutdown_notifiers =
NOTIFIER_LIST_INITIALIZER(shutdown_notifiers);
static uint32_t wakeup_reason_mask = ~(1 << QEMU_WAKEUP_REASON_NONE);
-ShutdownCause qemu_shutdown_requested_get(void)
+bool qemu_shutdown_requested(void)
{
return shutdown_requested;
}
--
2.43.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |