blob: e9f7fe1e1a8662e02a6da4639d72d51ed72270b9 [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 *
12 */
13
14#include "qemu-common.h"
aliguori376253e2009-03-05 23:01:23 +000015#include "monitor.h"
aliguori03ff3ca2008-09-15 15:51:35 +000016#include "qemu-timer.h"
Blue Swirl0bf9e312009-07-20 17:19:25 +000017#include "qemu-log.h"
aliguori03ff3ca2008-09-15 15:51:35 +000018
19#include <sys/time.h>
20
21QEMUClock *rt_clock;
Stefan Hajnoczi5fc09ca2011-05-09 16:45:39 +010022QEMUClock *vm_clock;
aliguori03ff3ca2008-09-15 15:51:35 +000023
Blue Swirl0bf9e312009-07-20 17:19:25 +000024FILE *logfile;
25
aliguori03ff3ca2008-09-15 15:51:35 +000026struct QEMUBH
27{
28 QEMUBHFunc *cb;
29 void *opaque;
30};
31
Markus Armbruster526f0ac2010-03-22 10:29:04 +010032Monitor *cur_mon;
33
34int monitor_cur_is_qmp(void)
35{
36 return 0;
37}
38
39void monitor_set_error(Monitor *mon, QError *qerror)
40{
41}
42
43void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
44{
45}
46
aliguori376253e2009-03-05 23:01:23 +000047void monitor_printf(Monitor *mon, const char *fmt, ...)
aliguori03ff3ca2008-09-15 15:51:35 +000048{
49}
50
aliguori376253e2009-03-05 23:01:23 +000051void monitor_print_filename(Monitor *mon, const char *filename)
aliguori03ff3ca2008-09-15 15:51:35 +000052{
53}
54
Luiz Capitulino0d1ea872009-11-26 22:59:03 -020055void monitor_protocol_event(MonitorEvent event, QObject *data)
56{
57}
58
aliguori03ff3ca2008-09-15 15:51:35 +000059int qemu_set_fd_handler2(int fd,
Juan Quintela7b27a762010-03-11 17:55:39 +010060 IOCanReadHandler *fd_read_poll,
aliguori03ff3ca2008-09-15 15:51:35 +000061 IOHandler *fd_read,
62 IOHandler *fd_write,
63 void *opaque)
64{
65 return 0;
66}
Kevin Wolf4e59b542011-02-22 18:42:31 +010067
68void qemu_notify_event(void)
69{
70}
Stefan Hajnoczi5fc09ca2011-05-09 16:45:39 +010071
72QEMUTimer *qemu_new_timer(QEMUClock *clock, int scale,
73 QEMUTimerCB *cb, void *opaque)
74{
Anthony Liguori7267c092011-08-20 22:09:37 -050075 return g_malloc(1);
Stefan Hajnoczi5fc09ca2011-05-09 16:45:39 +010076}
77
78void qemu_free_timer(QEMUTimer *ts)
79{
Anthony Liguori7267c092011-08-20 22:09:37 -050080 g_free(ts);
Stefan Hajnoczi5fc09ca2011-05-09 16:45:39 +010081}
82
83void qemu_del_timer(QEMUTimer *ts)
84{
85}
86
87void qemu_mod_timer(QEMUTimer *ts, int64_t expire_time)
88{
89}
90
91int64_t qemu_get_clock_ns(QEMUClock *clock)
92{
93 return 0;
94}