2008-09-15 19:51:35 +04:00
|
|
|
/*
|
|
|
|
* Compatibility for qemu-img/qemu-nbd
|
|
|
|
*
|
|
|
|
* Copyright IBM, Corp. 2008
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Anthony Liguori <aliguori@us.ibm.com>
|
|
|
|
*
|
|
|
|
* This work is licensed under the terms of the GNU GPL, version 2. See
|
|
|
|
* the COPYING file in the top-level directory.
|
|
|
|
*
|
2012-01-13 20:44:23 +04:00
|
|
|
* Contributions after 2012-01-13 are licensed under the terms of the
|
|
|
|
* GNU GPL, version 2 or (at your option) any later version.
|
2008-09-15 19:51:35 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "qemu-common.h"
|
2009-03-06 02:01:23 +03:00
|
|
|
#include "monitor.h"
|
2008-09-15 19:51:35 +04:00
|
|
|
#include "qemu-timer.h"
|
2009-07-20 21:19:25 +04:00
|
|
|
#include "qemu-log.h"
|
2011-11-15 01:09:47 +04:00
|
|
|
#include "migration.h"
|
2011-09-12 18:20:11 +04:00
|
|
|
#include "main-loop.h"
|
|
|
|
#include "qemu_socket.h"
|
|
|
|
#include "slirp/libslirp.h"
|
2008-09-15 19:51:35 +04:00
|
|
|
|
|
|
|
#include <sys/time.h>
|
|
|
|
|
|
|
|
struct QEMUBH
|
|
|
|
{
|
|
|
|
QEMUBHFunc *cb;
|
|
|
|
void *opaque;
|
|
|
|
};
|
|
|
|
|
2012-08-06 12:24:55 +04:00
|
|
|
const char *qemu_get_vm_name(void)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2010-03-22 12:29:04 +03:00
|
|
|
Monitor *cur_mon;
|
|
|
|
|
|
|
|
int monitor_cur_is_qmp(void)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void monitor_set_error(Monitor *mon, QError *qerror)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2009-03-06 02:01:23 +03:00
|
|
|
void monitor_printf(Monitor *mon, const char *fmt, ...)
|
2008-09-15 19:51:35 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2009-03-06 02:01:23 +03:00
|
|
|
void monitor_print_filename(Monitor *mon, const char *filename)
|
2008-09-15 19:51:35 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2009-11-27 03:59:03 +03:00
|
|
|
void monitor_protocol_event(MonitorEvent event, QObject *data)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-08-15 00:43:47 +04:00
|
|
|
int monitor_fdset_get_fd(int64_t fdset_id, int flags)
|
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int monitor_fdset_dup_fd_add(int64_t fdset_id, int dup_fd)
|
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int monitor_fdset_dup_fd_remove(int dup_fd)
|
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int monitor_fdset_dup_fd_find(int dup_fd)
|
|
|
|
{
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
2012-01-16 04:46:52 +04:00
|
|
|
int64_t cpu_get_clock(void)
|
2008-09-15 19:51:35 +04:00
|
|
|
{
|
2012-04-12 16:00:52 +04:00
|
|
|
return qemu_get_clock_ns(rt_clock);
|
2008-09-15 19:51:35 +04:00
|
|
|
}
|
2011-02-22 20:42:31 +03:00
|
|
|
|
2012-01-16 04:46:52 +04:00
|
|
|
int64_t cpu_get_icount(void)
|
2011-02-22 20:42:31 +03:00
|
|
|
{
|
2011-09-12 18:20:11 +04:00
|
|
|
abort();
|
2011-02-22 20:42:31 +03:00
|
|
|
}
|
2011-05-09 19:45:39 +04:00
|
|
|
|
2011-09-12 18:20:11 +04:00
|
|
|
void qemu_mutex_lock_iothread(void)
|
2011-05-09 19:45:39 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2011-09-12 18:20:11 +04:00
|
|
|
void qemu_mutex_unlock_iothread(void)
|
2011-05-09 19:45:39 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2011-09-12 18:20:11 +04:00
|
|
|
int use_icount;
|
|
|
|
|
|
|
|
void qemu_clock_warp(QEMUClock *clock)
|
2011-05-09 19:45:39 +04:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-01-21 21:13:53 +04:00
|
|
|
int qemu_init_main_loop(void)
|
2011-05-09 19:45:39 +04:00
|
|
|
{
|
2011-09-12 18:20:11 +04:00
|
|
|
init_clocks();
|
|
|
|
init_timer_alarm();
|
2012-01-21 21:13:53 +04:00
|
|
|
return main_loop_init();
|
2011-05-09 19:45:39 +04:00
|
|
|
}
|
|
|
|
|
2012-04-13 22:35:04 +04:00
|
|
|
void slirp_update_timeout(uint32_t *timeout)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2011-09-12 18:20:11 +04:00
|
|
|
void slirp_select_fill(int *pnfds, fd_set *readfds,
|
|
|
|
fd_set *writefds, fd_set *xfds)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void slirp_select_poll(fd_set *readfds, fd_set *writefds,
|
|
|
|
fd_set *xfds, int select_error)
|
2011-05-09 19:45:39 +04:00
|
|
|
{
|
|
|
|
}
|
2011-11-15 01:09:47 +04:00
|
|
|
|
|
|
|
void migrate_add_blocker(Error *reason)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void migrate_del_blocker(Error *reason)
|
|
|
|
{
|
|
|
|
}
|