[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 20/32] include: move dump_in_progress() to runstate.h
From: |
marcandre . lureau |
Subject: |
[PATCH 20/32] include: move dump_in_progress() to runstate.h |
Date: |
Wed, 23 Mar 2022 19:57:31 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Along with other state tracking functions. Rename it for consistency.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
include/qemu-common.h | 4 ----
include/sysemu/runstate.h | 1 +
dump/dump.c | 4 ++--
monitor/qmp-cmds.c | 4 ++--
4 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/include/qemu-common.h b/include/qemu-common.h
index fdb0b16166a5..5f53a0e11287 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -76,8 +76,4 @@ int parse_debug_env(const char *name, int max, int initial);
void page_size_init(void);
-/* returns non-zero if dump is in progress, otherwise zero is
- * returned. */
-bool dump_in_progress(void);
-
#endif
diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h
index a53569157343..c3f445dd2683 100644
--- a/include/sysemu/runstate.h
+++ b/include/sysemu/runstate.h
@@ -69,6 +69,7 @@ void qemu_system_killed(int signal, pid_t pid);
void qemu_system_reset(ShutdownCause reason);
void qemu_system_guest_panicked(GuestPanicInformation *info);
void qemu_system_guest_crashloaded(GuestPanicInformation *info);
+bool qemu_system_dump_in_progress(void);
#endif
diff --git a/dump/dump.c b/dump/dump.c
index f57ed76fa76d..5d71c47d06aa 100644
--- a/dump/dump.c
+++ b/dump/dump.c
@@ -1564,7 +1564,7 @@ static void dump_state_prepare(DumpState *s)
*s = (DumpState) { .status = DUMP_STATUS_ACTIVE };
}
-bool dump_in_progress(void)
+bool qemu_system_dump_in_progress(void)
{
DumpState *state = &dump_state_global;
return (qatomic_read(&state->status) == DUMP_STATUS_ACTIVE);
@@ -1930,7 +1930,7 @@ void qmp_dump_guest_memory(bool paging, const char *file,
/* if there is a dump in background, we should wait until the dump
* finished */
- if (dump_in_progress()) {
+ if (qemu_system_dump_in_progress()) {
error_setg(errp, "There is a dump in process, please wait.");
return;
}
diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
index 0b04855ce899..883cf1ca4bbf 100644
--- a/monitor/qmp-cmds.c
+++ b/monitor/qmp-cmds.c
@@ -85,7 +85,7 @@ void qmp_stop(Error **errp)
{
/* if there is a dump in background, we should wait until the dump
* finished */
- if (dump_in_progress()) {
+ if (qemu_system_dump_in_progress()) {
error_setg(errp, "There is a dump in process, please wait.");
return;
}
@@ -115,7 +115,7 @@ void qmp_cont(Error **errp)
/* if there is a dump in background, we should wait until the dump
* finished */
- if (dump_in_progress()) {
+ if (qemu_system_dump_in_progress()) {
error_setg(errp, "There is a dump in process, please wait.");
return;
}
--
2.35.1.273.ge6ebfd0e8cbb
- [PATCH 12/32] qga: replace deprecated g_get_current_time(), (continued)
- [PATCH 12/32] qga: replace deprecated g_get_current_time(), marcandre . lureau, 2022/03/23
- [PATCH 11/32] Replace qemu_real_host_page variables with inlined functions, marcandre . lureau, 2022/03/23
- [PATCH 14/32] util: rename qemu-error.c to match its header name, marcandre . lureau, 2022/03/23
- [PATCH 13/32] error-report: replace deprecated g_get_current_time() with glib >= 2.62, marcandre . lureau, 2022/03/23
- [PATCH 15/32] error-report: use error_printf() for program prefix, marcandre . lureau, 2022/03/23
- [PATCH 16/32] include: move TFR to osdep.h, marcandre . lureau, 2022/03/23
- [PATCH 18/32] include: move qemu_pipe() to osdep.h, marcandre . lureau, 2022/03/23
- [PATCH 17/32] include: move qemu_write_full() declaration to osdep.h, marcandre . lureau, 2022/03/23
- [PATCH 19/32] include: move coroutine IO functions to coroutine.h, marcandre . lureau, 2022/03/23
- [PATCH 20/32] include: move dump_in_progress() to runstate.h,
marcandre . lureau <=
- [PATCH 21/32] include: move C/util-related declarations to cutils.h, marcandre . lureau, 2022/03/23
- [PATCH 22/32] include: move cpu_exec* declarations to cpu-common.h, marcandre . lureau, 2022/03/23
- [PATCH 23/32] include: move target page bits declaration to page-vary.h, marcandre . lureau, 2022/03/23
- [PATCH 24/32] include: move progress API to qemu-progress.h, marcandre . lureau, 2022/03/23
- [PATCH 25/32] include: move qemu_get_vm_name() to sysemu.h, marcandre . lureau, 2022/03/23
- [PATCH 26/32] include: move os_*() to os-foo.h, marcandre . lureau, 2022/03/23