Revision b1a15e7e

b/monitor.c
342 342
        return;
343 343

  
344 344
    switch (event) {
345
        case EVENT_DEBUG:
346
            event_name = "DEBUG";
347
            break;
348
        case EVENT_SHUTDOWN:
349
            event_name = "SHUTDOWN";
350
            break;
351
        case EVENT_RESET:
352
            event_name = "RESET";
353
            break;
354
        case EVENT_POWERDOWN:
355
            event_name = "POWERDOWN";
356
            break;
357
        case EVENT_STOP:
358
            event_name = "STOP";
359
            break;
345 360
        default:
346 361
            abort();
347 362
            break;
b/monitor.h
15 15

  
16 16
/* QMP events */
17 17
typedef enum MonitorEvent {
18
    EVENT_DEBUG,
19
    EVENT_SHUTDOWN,
20
    EVENT_RESET,
21
    EVENT_POWERDOWN,
22
    EVENT_STOP,
18 23
    EVENT_MAX,
19 24
} MonitorEvent;
20 25

  
b/vl.c
4060 4060
#endif
4061 4061
        } while (vm_can_run());
4062 4062

  
4063
        if (qemu_debug_requested())
4063
        if (qemu_debug_requested()) {
4064
            monitor_protocol_event(EVENT_DEBUG, NULL);
4064 4065
            vm_stop(EXCP_DEBUG);
4066
        }
4065 4067
        if (qemu_shutdown_requested()) {
4068
            monitor_protocol_event(EVENT_SHUTDOWN, NULL);
4066 4069
            if (no_shutdown) {
4067 4070
                vm_stop(0);
4068 4071
                no_shutdown = 0;
......
4070 4073
                break;
4071 4074
        }
4072 4075
        if (qemu_reset_requested()) {
4076
            monitor_protocol_event(EVENT_RESET, NULL);
4073 4077
            pause_all_vcpus();
4074 4078
            qemu_system_reset();
4075 4079
            resume_all_vcpus();
4076 4080
        }
4077 4081
        if (qemu_powerdown_requested()) {
4082
            monitor_protocol_event(EVENT_POWERDOWN, NULL);
4078 4083
            qemu_irq_raise(qemu_system_powerdown);
4079 4084
        }
4080
        if ((r = qemu_vmstop_requested()))
4085
        if ((r = qemu_vmstop_requested())) {
4086
            monitor_protocol_event(EVENT_STOP, NULL);
4081 4087
            vm_stop(r);
4088
        }
4082 4089
    }
4083 4090
    pause_all_vcpus();
4084 4091
}

Also available in: Unified diff