]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * Compatibility for qemu-img/qemu-nbd | |
3 | * | |
4 | * Copyright IBM, Corp. 2008 | |
5 | * | |
6 | * Authors: | |
7 | * Anthony Liguori <aliguori@us.ibm.com> | |
8 | * | |
9 | * This work is licensed under the terms of the GNU GPL, version 2. See | |
10 | * the COPYING file in the top-level directory. | |
11 | * | |
12 | * Contributions after 2012-01-13 are licensed under the terms of the | |
13 | * GNU GPL, version 2 or (at your option) any later version. | |
14 | */ | |
15 | ||
16 | #include "qemu-common.h" | |
17 | #include "monitor.h" | |
18 | #include "qemu-timer.h" | |
19 | #include "qemu-log.h" | |
20 | #include "migration.h" | |
21 | #include "main-loop.h" | |
22 | #include "qemu_socket.h" | |
23 | #include "slirp/libslirp.h" | |
24 | ||
25 | #include <sys/time.h> | |
26 | ||
27 | FILE *logfile; | |
28 | ||
29 | struct QEMUBH | |
30 | { | |
31 | QEMUBHFunc *cb; | |
32 | void *opaque; | |
33 | }; | |
34 | ||
35 | Monitor *cur_mon; | |
36 | ||
37 | int monitor_cur_is_qmp(void) | |
38 | { | |
39 | return 0; | |
40 | } | |
41 | ||
42 | void monitor_set_error(Monitor *mon, QError *qerror) | |
43 | { | |
44 | } | |
45 | ||
46 | void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap) | |
47 | { | |
48 | } | |
49 | ||
50 | void monitor_printf(Monitor *mon, const char *fmt, ...) | |
51 | { | |
52 | } | |
53 | ||
54 | void monitor_print_filename(Monitor *mon, const char *filename) | |
55 | { | |
56 | } | |
57 | ||
58 | void monitor_protocol_event(MonitorEvent event, QObject *data) | |
59 | { | |
60 | } | |
61 | ||
62 | int64_t cpu_get_clock(void) | |
63 | { | |
64 | return qemu_get_clock_ns(rt_clock); | |
65 | } | |
66 | ||
67 | int64_t cpu_get_icount(void) | |
68 | { | |
69 | abort(); | |
70 | } | |
71 | ||
72 | void qemu_mutex_lock_iothread(void) | |
73 | { | |
74 | } | |
75 | ||
76 | void qemu_mutex_unlock_iothread(void) | |
77 | { | |
78 | } | |
79 | ||
80 | int use_icount; | |
81 | ||
82 | void qemu_clock_warp(QEMUClock *clock) | |
83 | { | |
84 | } | |
85 | ||
86 | int qemu_init_main_loop(void) | |
87 | { | |
88 | init_clocks(); | |
89 | init_timer_alarm(); | |
90 | return main_loop_init(); | |
91 | } | |
92 | ||
93 | void slirp_update_timeout(uint32_t *timeout) | |
94 | { | |
95 | } | |
96 | ||
97 | void slirp_select_fill(int *pnfds, fd_set *readfds, | |
98 | fd_set *writefds, fd_set *xfds) | |
99 | { | |
100 | } | |
101 | ||
102 | void slirp_select_poll(fd_set *readfds, fd_set *writefds, | |
103 | fd_set *xfds, int select_error) | |
104 | { | |
105 | } | |
106 | ||
107 | void migrate_add_blocker(Error *reason) | |
108 | { | |
109 | } | |
110 | ||
111 | void migrate_del_blocker(Error *reason) | |
112 | { | |
113 | } |