slirp: check system() success
[qemu/cris-port.git] / monitor.h
blobe5f2d2ba70385070aef7bba42519adfc5f8dfe64
1 #ifndef MONITOR_H
2 #define MONITOR_H
4 #include "qemu-common.h"
5 #include "qemu-char.h"
6 #include "qdict.h"
7 #include "block.h"
9 extern Monitor *cur_mon;
11 /* flags for monitor_init */
12 #define MONITOR_IS_DEFAULT 0x01
13 #define MONITOR_USE_READLINE 0x02
14 #define MONITOR_USE_CONTROL 0x04
16 /* QMP events */
17 typedef enum MonitorEvent {
18 QEVENT_SHUTDOWN,
19 QEVENT_RESET,
20 QEVENT_POWERDOWN,
21 QEVENT_STOP,
22 QEVENT_VNC_CONNECTED,
23 QEVENT_VNC_INITIALIZED,
24 QEVENT_VNC_DISCONNECTED,
25 QEVENT_BLOCK_IO_ERROR,
26 QEVENT_RTC_CHANGE,
27 QEVENT_WATCHDOG,
28 QEVENT_MAX,
29 } MonitorEvent;
31 void monitor_protocol_event(MonitorEvent event, QObject *data);
32 void monitor_init(CharDriverState *chr, int flags);
34 int monitor_suspend(Monitor *mon);
35 void monitor_resume(Monitor *mon);
37 int monitor_read_bdrv_key_start(Monitor *mon, BlockDriverState *bs,
38 BlockDriverCompletionFunc *completion_cb,
39 void *opaque);
41 int monitor_get_fd(Monitor *mon, const char *fdname);
43 void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap);
44 void monitor_printf(Monitor *mon, const char *fmt, ...)
45 __attribute__ ((__format__ (__printf__, 2, 3)));
46 void monitor_print_filename(Monitor *mon, const char *filename);
47 void monitor_flush(Monitor *mon);
49 typedef void (MonitorCompletion)(void *opaque, QObject *ret_data);
51 #endif /* !MONITOR_H */