monitor: rename EVENT_* to QEVENT_* to avoid conflict on mingw32
Partially fixes mingw32 build. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
31a68d5766
commit
242cd0030a
12
monitor.c
12
monitor.c
@ -345,25 +345,25 @@ void monitor_protocol_event(MonitorEvent event, QObject *data)
|
|||||||
const char *event_name;
|
const char *event_name;
|
||||||
Monitor *mon = cur_mon;
|
Monitor *mon = cur_mon;
|
||||||
|
|
||||||
assert(event < EVENT_MAX);
|
assert(event < QEVENT_MAX);
|
||||||
|
|
||||||
if (!monitor_ctrl_mode(mon))
|
if (!monitor_ctrl_mode(mon))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case EVENT_DEBUG:
|
case QEVENT_DEBUG:
|
||||||
event_name = "DEBUG";
|
event_name = "DEBUG";
|
||||||
break;
|
break;
|
||||||
case EVENT_SHUTDOWN:
|
case QEVENT_SHUTDOWN:
|
||||||
event_name = "SHUTDOWN";
|
event_name = "SHUTDOWN";
|
||||||
break;
|
break;
|
||||||
case EVENT_RESET:
|
case QEVENT_RESET:
|
||||||
event_name = "RESET";
|
event_name = "RESET";
|
||||||
break;
|
break;
|
||||||
case EVENT_POWERDOWN:
|
case QEVENT_POWERDOWN:
|
||||||
event_name = "POWERDOWN";
|
event_name = "POWERDOWN";
|
||||||
break;
|
break;
|
||||||
case EVENT_STOP:
|
case QEVENT_STOP:
|
||||||
event_name = "STOP";
|
event_name = "STOP";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
12
monitor.h
12
monitor.h
@ -15,12 +15,12 @@ extern Monitor *cur_mon;
|
|||||||
|
|
||||||
/* QMP events */
|
/* QMP events */
|
||||||
typedef enum MonitorEvent {
|
typedef enum MonitorEvent {
|
||||||
EVENT_DEBUG,
|
QEVENT_DEBUG,
|
||||||
EVENT_SHUTDOWN,
|
QEVENT_SHUTDOWN,
|
||||||
EVENT_RESET,
|
QEVENT_RESET,
|
||||||
EVENT_POWERDOWN,
|
QEVENT_POWERDOWN,
|
||||||
EVENT_STOP,
|
QEVENT_STOP,
|
||||||
EVENT_MAX,
|
QEVENT_MAX,
|
||||||
} MonitorEvent;
|
} MonitorEvent;
|
||||||
|
|
||||||
void monitor_protocol_event(MonitorEvent event, QObject *data);
|
void monitor_protocol_event(MonitorEvent event, QObject *data);
|
||||||
|
10
vl.c
10
vl.c
@ -4103,11 +4103,11 @@ static void main_loop(void)
|
|||||||
} while (vm_can_run());
|
} while (vm_can_run());
|
||||||
|
|
||||||
if (qemu_debug_requested()) {
|
if (qemu_debug_requested()) {
|
||||||
monitor_protocol_event(EVENT_DEBUG, NULL);
|
monitor_protocol_event(QEVENT_DEBUG, NULL);
|
||||||
vm_stop(EXCP_DEBUG);
|
vm_stop(EXCP_DEBUG);
|
||||||
}
|
}
|
||||||
if (qemu_shutdown_requested()) {
|
if (qemu_shutdown_requested()) {
|
||||||
monitor_protocol_event(EVENT_SHUTDOWN, NULL);
|
monitor_protocol_event(QEVENT_SHUTDOWN, NULL);
|
||||||
if (no_shutdown) {
|
if (no_shutdown) {
|
||||||
vm_stop(0);
|
vm_stop(0);
|
||||||
no_shutdown = 0;
|
no_shutdown = 0;
|
||||||
@ -4115,17 +4115,17 @@ static void main_loop(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (qemu_reset_requested()) {
|
if (qemu_reset_requested()) {
|
||||||
monitor_protocol_event(EVENT_RESET, NULL);
|
monitor_protocol_event(QEVENT_RESET, NULL);
|
||||||
pause_all_vcpus();
|
pause_all_vcpus();
|
||||||
qemu_system_reset();
|
qemu_system_reset();
|
||||||
resume_all_vcpus();
|
resume_all_vcpus();
|
||||||
}
|
}
|
||||||
if (qemu_powerdown_requested()) {
|
if (qemu_powerdown_requested()) {
|
||||||
monitor_protocol_event(EVENT_POWERDOWN, NULL);
|
monitor_protocol_event(QEVENT_POWERDOWN, NULL);
|
||||||
qemu_irq_raise(qemu_system_powerdown);
|
qemu_irq_raise(qemu_system_powerdown);
|
||||||
}
|
}
|
||||||
if ((r = qemu_vmstop_requested())) {
|
if ((r = qemu_vmstop_requested())) {
|
||||||
monitor_protocol_event(EVENT_STOP, NULL);
|
monitor_protocol_event(QEVENT_STOP, NULL);
|
||||||
vm_stop(r);
|
vm_stop(r);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user