Skip to content

Commit 544803c

Browse files
elmarcobonzini
authored andcommitted
include: move dump_in_progress() to runstate.h
Along with other state tracking functions. Rename it for consistency. Signed-off-by: Marc-André Lureau <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent c097f1e commit 544803c

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

dump/dump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ static void dump_state_prepare(DumpState *s)
15641564
*s = (DumpState) { .status = DUMP_STATUS_ACTIVE };
15651565
}
15661566

1567-
bool dump_in_progress(void)
1567+
bool qemu_system_dump_in_progress(void)
15681568
{
15691569
DumpState *state = &dump_state_global;
15701570
return (qatomic_read(&state->status) == DUMP_STATUS_ACTIVE);
@@ -1930,7 +1930,7 @@ void qmp_dump_guest_memory(bool paging, const char *file,
19301930

19311931
/* if there is a dump in background, we should wait until the dump
19321932
* finished */
1933-
if (dump_in_progress()) {
1933+
if (qemu_system_dump_in_progress()) {
19341934
error_setg(errp, "There is a dump in process, please wait.");
19351935
return;
19361936
}

include/qemu-common.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,4 @@ int parse_debug_env(const char *name, int max, int initial);
7676

7777
void page_size_init(void);
7878

79-
/* returns non-zero if dump is in progress, otherwise zero is
80-
* returned. */
81-
bool dump_in_progress(void);
82-
8379
#endif

include/sysemu/runstate.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ void qemu_system_killed(int signal, pid_t pid);
6969
void qemu_system_reset(ShutdownCause reason);
7070
void qemu_system_guest_panicked(GuestPanicInformation *info);
7171
void qemu_system_guest_crashloaded(GuestPanicInformation *info);
72+
bool qemu_system_dump_in_progress(void);
7273

7374
#endif
7475

monitor/qmp-cmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void qmp_stop(Error **errp)
8585
{
8686
/* if there is a dump in background, we should wait until the dump
8787
* finished */
88-
if (dump_in_progress()) {
88+
if (qemu_system_dump_in_progress()) {
8989
error_setg(errp, "There is a dump in process, please wait.");
9090
return;
9191
}
@@ -115,7 +115,7 @@ void qmp_cont(Error **errp)
115115

116116
/* if there is a dump in background, we should wait until the dump
117117
* finished */
118-
if (dump_in_progress()) {
118+
if (qemu_system_dump_in_progress()) {
119119
error_setg(errp, "There is a dump in process, please wait.");
120120
return;
121121
}

0 commit comments

Comments
 (0)