blob: 6579b00552fe503b86ee46ad6988df96d0f3dd65 [file] [log] [blame]
aliguori03ff3ca2008-09-15 15:51:35 +00001/*
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 *
Paolo Bonzini6b620ca2012-01-13 17:44:23 +010012 * Contributions after 2012-01-13 are licensed under the terms of the
13 * GNU GPL, version 2 or (at your option) any later version.
aliguori03ff3ca2008-09-15 15:51:35 +000014 */
15
16#include "qemu-common.h"
aliguori376253e2009-03-05 23:01:23 +000017#include "monitor.h"
aliguori03ff3ca2008-09-15 15:51:35 +000018#include "qemu-timer.h"
Blue Swirl0bf9e312009-07-20 17:19:25 +000019#include "qemu-log.h"
Anthony Liguori1ed520c2011-11-14 15:09:47 -060020#include "migration.h"
Paolo Bonzinicbcfa042011-09-12 16:20:11 +020021#include "main-loop.h"
22#include "qemu_socket.h"
23#include "slirp/libslirp.h"
aliguori03ff3ca2008-09-15 15:51:35 +000024
25#include <sys/time.h>
26
Blue Swirl0bf9e312009-07-20 17:19:25 +000027FILE *logfile;
28
aliguori03ff3ca2008-09-15 15:51:35 +000029struct QEMUBH
30{
31 QEMUBHFunc *cb;
32 void *opaque;
33};
34
Markus Armbruster526f0ac2010-03-22 10:29:04 +010035Monitor *cur_mon;
36
37int monitor_cur_is_qmp(void)
38{
39 return 0;
40}
41
42void monitor_set_error(Monitor *mon, QError *qerror)
43{
44}
45
46void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
47{
48}
49
aliguori376253e2009-03-05 23:01:23 +000050void monitor_printf(Monitor *mon, const char *fmt, ...)
aliguori03ff3ca2008-09-15 15:51:35 +000051{
52}
53
aliguori376253e2009-03-05 23:01:23 +000054void monitor_print_filename(Monitor *mon, const char *filename)
aliguori03ff3ca2008-09-15 15:51:35 +000055{
56}
57
Luiz Capitulino0d1ea872009-11-26 22:59:03 -020058void monitor_protocol_event(MonitorEvent event, QObject *data)
59{
60}
61
Andreas Färber49cb8262012-01-16 01:46:52 +010062int64_t cpu_get_clock(void)
aliguori03ff3ca2008-09-15 15:51:35 +000063{
Paolo Bonzini8a832052012-04-12 14:00:52 +020064 return qemu_get_clock_ns(rt_clock);
aliguori03ff3ca2008-09-15 15:51:35 +000065}
Kevin Wolf4e59b542011-02-22 18:42:31 +010066
Andreas Färber49cb8262012-01-16 01:46:52 +010067int64_t cpu_get_icount(void)
Paolo Bonzinicbcfa042011-09-12 16:20:11 +020068{
69 abort();
70}
71
72void qemu_mutex_lock_iothread(void)
Kevin Wolf4e59b542011-02-22 18:42:31 +010073{
74}
Stefan Hajnoczi5fc09ca2011-05-09 16:45:39 +010075
Paolo Bonzinicbcfa042011-09-12 16:20:11 +020076void qemu_mutex_unlock_iothread(void)
Stefan Hajnoczi5fc09ca2011-05-09 16:45:39 +010077{
78}
79
Paolo Bonzinicbcfa042011-09-12 16:20:11 +020080int use_icount;
81
82void qemu_clock_warp(QEMUClock *clock)
Stefan Hajnoczi5fc09ca2011-05-09 16:45:39 +010083{
84}
85
Michael Rothd34e8f62012-01-21 11:13:53 -060086int qemu_init_main_loop(void)
Stefan Hajnoczi5fc09ca2011-05-09 16:45:39 +010087{
Paolo Bonzinicbcfa042011-09-12 16:20:11 +020088 init_clocks();
89 init_timer_alarm();
Michael Rothd34e8f62012-01-21 11:13:53 -060090 return main_loop_init();
Paolo Bonzinicbcfa042011-09-12 16:20:11 +020091}
92
93void slirp_select_fill(int *pnfds, fd_set *readfds,
94 fd_set *writefds, fd_set *xfds)
95{
96}
97
98void slirp_select_poll(fd_set *readfds, fd_set *writefds,
99 fd_set *xfds, int select_error)
100{
Stefan Hajnoczi5fc09ca2011-05-09 16:45:39 +0100101}
Anthony Liguori1ed520c2011-11-14 15:09:47 -0600102
103void migrate_add_blocker(Error *reason)
104{
105}
106
107void migrate_del_blocker(Error *reason)
108{
109}