[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 25/53] include: move dump_in_progress() to runstate.h
From: |
Paolo Bonzini |
Subject: |
[PULL 25/53] include: move dump_in_progress() to runstate.h |
Date: |
Tue, 19 Apr 2022 07:50:41 +0200 |
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>
Message-Id: <20220323155743.1585078-21-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
dump/dump.c | 4 ++--
include/qemu-common.h | 4 ----
include/sysemu/runstate.h | 1 +
monitor/qmp-cmds.c | 4 ++--
4 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/dump/dump.c b/dump/dump.c
index f57ed76fa7..5d71c47d06 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/include/qemu-common.h b/include/qemu-common.h
index fdb0b16166..5f53a0e112 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 a535691573..c3f445dd26 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/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
index 0b04855ce8..883cf1ca4b 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
- [PULL 29/53] include: move progress API to qemu-progress.h, (continued)
- [PULL 29/53] include: move progress API to qemu-progress.h, Paolo Bonzini, 2022/04/19
- [PULL 45/53] hyperv: Add definitions for syndbg, Paolo Bonzini, 2022/04/19
- [PULL 46/53] hyperv: Add support to process syndbg commands, Paolo Bonzini, 2022/04/19
- [PULL 36/53] Remove qemu-common.h include from most units, Paolo Bonzini, 2022/04/19
- [PULL 48/53] s390x: follow qdev tree to detect SCSI device on a CCW bus, Paolo Bonzini, 2022/04/19
- [PULL 22/53] include: move qemu_write_full() declaration to osdep.h, Paolo Bonzini, 2022/04/19
- [PULL 18/53] error-report: replace deprecated g_get_current_time() with glib >= 2.62, Paolo Bonzini, 2022/04/19
- [PULL 43/53] thread-posix: optimize qemu_sem_timedwait with zero timeout, Paolo Bonzini, 2022/04/19
- [PULL 50/53] virtio-ccw: move device type declarations to .c files, Paolo Bonzini, 2022/04/19
- [PULL 53/53] target/i386: Remove unused XMMReg, YMMReg types and CPUState fields, Paolo Bonzini, 2022/04/19
- [PULL 25/53] include: move dump_in_progress() to runstate.h,
Paolo Bonzini <=
- [PULL 26/53] include: move C/util-related declarations to cutils.h, Paolo Bonzini, 2022/04/19
- [PULL 32/53] include: move page_size_init() to include/hw/core/cpu.h, Paolo Bonzini, 2022/04/19
- [PULL 42/53] thread-posix: implement Semaphore with QemuCond and QemuMutex, Paolo Bonzini, 2022/04/19
- [PULL 39/53] whpx: Added support for breakpoints and stepping, Paolo Bonzini, 2022/04/19
- [PULL 47/53] hw: hyperv: Initial commit for Synthetic Debugging device, Paolo Bonzini, 2022/04/19
- [PULL 49/53] virtio-ccw: move vhost_ccw_scsi to a separate file, Paolo Bonzini, 2022/04/19
- [PULL 51/53] virtio-ccw: do not include headers for all virtio devices, Paolo Bonzini, 2022/04/19
- Re: [PULL for-7.1 00/53] Misc pull request for QEMU 7.1, Peter Maydell, 2022/04/19
- Re: [PULL for-7.1 00/53] Misc pull request for QEMU 7.1, Richard Henderson, 2022/04/19