e1000: Preserve link state across device reset
[qemu.git] / qemu-tool.c
blob6b69668258da748f25536bc3c1d5c06a2b017768
1 /*
2 * Compatibility for qemu-img/qemu-nbd
4 * Copyright IBM, Corp. 2008
6 * Authors:
7 * Anthony Liguori <aliguori@us.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
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.
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"
25 #include <sys/time.h>
27 FILE *logfile;
29 struct QEMUBH
31 QEMUBHFunc *cb;
32 void *opaque;
35 Monitor *cur_mon;
37 int monitor_cur_is_qmp(void)
39 return 0;
42 void monitor_set_error(Monitor *mon, QError *qerror)
46 void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap)
50 void monitor_printf(Monitor *mon, const char *fmt, ...)
54 void monitor_print_filename(Monitor *mon, const char *filename)
58 void monitor_protocol_event(MonitorEvent event, QObject *data)
62 int64_t cpu_get_clock(void)
64 abort();
67 int64_t cpu_get_icount(void)
69 abort();
72 void qemu_mutex_lock_iothread(void)
76 void qemu_mutex_unlock_iothread(void)
80 int use_icount;
82 void qemu_clock_warp(QEMUClock *clock)
86 static void __attribute__((constructor)) init_main_loop(void)
88 init_clocks();
89 init_timer_alarm();
90 qemu_clock_enable(vm_clock, false);
93 void slirp_select_fill(int *pnfds, fd_set *readfds,
94 fd_set *writefds, fd_set *xfds)
98 void slirp_select_poll(fd_set *readfds, fd_set *writefds,
99 fd_set *xfds, int select_error)
103 void migrate_add_blocker(Error *reason)
107 void migrate_del_blocker(Error *reason)