include: move dump_in_progress() to runstate.h
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 23 Mar 2022 15:57:31 +0000 (19:57 +0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 6 Apr 2022 12:31:43 +0000 (14:31 +0200)
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
include/qemu-common.h
include/sysemu/runstate.h
monitor/qmp-cmds.c

index f57ed76fa76d0e14d4e56d85ce1a3a753d3ea45f..5d71c47d06aa8a44a3f60e8e2f0ab796b6798f5c 100644 (file)
@@ -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;
     }
index fdb0b16166a5020315ef4632600b7c2148325c5f..5f53a0e11287af6759b024778ffb8cbc183f0332 100644 (file)
@@ -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
index a53569157343499a997188621b664a3062183020..c3f445dd268314af28512ab4546cd3cbf533d45a 100644 (file)
@@ -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
 
index 0b04855ce899f2189eef3501b3452f3ea80dab45..883cf1ca4bbfbb44296b6b8d7d8938e9a269a9c4 100644 (file)
@@ -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;
     }