Skip to content

Commit 538f049

Browse files
philmdvivier
authored andcommitted
sysemu: Let VMChangeStateHandler take boolean 'running' argument
The 'running' argument from VMChangeStateHandler does not require other value than 0 / 1. Make it a plain boolean. Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Alex Bennée <[email protected]> Acked-by: David Gibson <[email protected]> Message-Id: <[email protected]> Signed-off-by: Laurent Vivier <[email protected]>
1 parent 0a38950 commit 538f049

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+49
-43
lines changed

accel/xen/xen-all.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static void xenstore_record_dm_state(struct xs_handle *xs, const char *state)
122122
}
123123

124124

125-
static void xen_change_state_handler(void *opaque, int running,
125+
static void xen_change_state_handler(void *opaque, bool running,
126126
RunState state)
127127
{
128128
if (running) {

audio/audio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1540,7 +1540,7 @@ static int audio_driver_init(AudioState *s, struct audio_driver *drv,
15401540
}
15411541
}
15421542

1543-
static void audio_vm_change_state_handler (void *opaque, int running,
1543+
static void audio_vm_change_state_handler (void *opaque, bool running,
15441544
RunState state)
15451545
{
15461546
AudioState *s = opaque;

block/block-backend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static const char *blk_root_get_name(BdrvChild *child)
163163
return blk_name(child->opaque);
164164
}
165165

166-
static void blk_vm_state_changed(void *opaque, int running, RunState state)
166+
static void blk_vm_state_changed(void *opaque, bool running, RunState state)
167167
{
168168
Error *local_err = NULL;
169169
BlockBackend *blk = opaque;

gdbstub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2754,7 +2754,7 @@ void gdb_set_stop_cpu(CPUState *cpu)
27542754
}
27552755

27562756
#ifndef CONFIG_USER_ONLY
2757-
static void gdb_vm_state_change(void *opaque, int running, RunState state)
2757+
static void gdb_vm_state_change(void *opaque, bool running, RunState state)
27582758
{
27592759
CPUState *cpu = gdbserver_state.c_cpu;
27602760
g_autoptr(GString) buf = g_string_new(NULL);

hw/block/pflash_cfi01.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ void pflash_cfi01_legacy_drive(PFlashCFI01 *fl, DriveInfo *dinfo)
10141014
loc_pop(&loc);
10151015
}
10161016

1017-
static void postload_update_cb(void *opaque, int running, RunState state)
1017+
static void postload_update_cb(void *opaque, bool running, RunState state)
10181018
{
10191019
PFlashCFI01 *pfl = opaque;
10201020

hw/block/virtio-blk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ static void virtio_blk_dma_restart_bh(void *opaque)
870870
virtio_blk_process_queued_requests(s, true);
871871
}
872872

873-
static void virtio_blk_dma_restart_cb(void *opaque, int running,
873+
static void virtio_blk_dma_restart_cb(void *opaque, bool running,
874874
RunState state)
875875
{
876876
VirtIOBlock *s = opaque;

hw/display/qxl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1992,7 +1992,7 @@ static void qxl_dirty_surfaces(PCIQXLDevice *qxl)
19921992
}
19931993
}
19941994

1995-
static void qxl_vm_change_state_handler(void *opaque, int running,
1995+
static void qxl_vm_change_state_handler(void *opaque, bool running,
19961996
RunState state)
19971997
{
19981998
PCIQXLDevice *qxl = opaque;

hw/i386/kvm/clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static void do_kvmclock_ctrl(CPUState *cpu, run_on_cpu_data data)
162162
}
163163
}
164164

165-
static void kvmclock_vm_state_change(void *opaque, int running,
165+
static void kvmclock_vm_state_change(void *opaque, bool running,
166166
RunState state)
167167
{
168168
KVMClockState *s = opaque;

hw/i386/kvm/i8254.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ static void kvm_pit_irq_control(void *opaque, int n, int enable)
239239
kvm_pit_put(pit);
240240
}
241241

242-
static void kvm_pit_vm_state_change(void *opaque, int running,
242+
static void kvm_pit_vm_state_change(void *opaque, bool running,
243243
RunState state)
244244
{
245245
KVMPITState *s = opaque;

hw/i386/kvmvapic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ static void do_vapic_enable(CPUState *cs, run_on_cpu_data data)
748748
s->state = VAPIC_ACTIVE;
749749
}
750750

751-
static void kvmvapic_vm_state_change(void *opaque, int running,
751+
static void kvmvapic_vm_state_change(void *opaque, bool running,
752752
RunState state)
753753
{
754754
MachineState *ms = MACHINE(qdev_get_machine());

0 commit comments

Comments
 (0)