summaryrefslogtreecommitdiff
path: root/qemu-tool.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2011-05-09 16:45:39 +0100
committerKevin Wolf <kwolf@redhat.com>2011-05-18 14:38:46 +0200
commit823f3df377594cff5160e0098eb30aab3b6ef9d2 (patch)
tree5502a6f762b436057342f590f9e91061e34ea7f0 /qemu-tool.c
parent512af9b50e5348933045b5eb00059379585810be (diff)
downloadqemu-823f3df377594cff5160e0098eb30aab3b6ef9d2.tar.gz
qemu-823f3df377594cff5160e0098eb30aab3b6ef9d2.tar.bz2
qemu-823f3df377594cff5160e0098eb30aab3b6ef9d2.zip
qemu-tool: Stub out qemu-timer functions
Block drivers may use timers for flushing metadata to disk or reconnecting to a network drive. Stub out the following functions in qemu-tool.c: QEMUTimer *qemu_new_timer_ns(QEMUClock *clock, int scale, QEMUTimerCB *cb, void *opaque) void qemu_free_timer(QEMUTimer *ts) void qemu_del_timer(QEMUTimer *ts) void qemu_mod_timer(QEMUTimer *ts, int64_t expire_time) int64_t qemu_get_clock_ns(QEMUClock *clock) They will result in timers never firing when linked against qemu-tool.o. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-tool.c')
-rw-r--r--qemu-tool.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/qemu-tool.c b/qemu-tool.c
index f4a6ad081c..41e5c4156a 100644
--- a/qemu-tool.c
+++ b/qemu-tool.c
@@ -19,6 +19,7 @@
#include <sys/time.h>
QEMUClock *rt_clock;
+QEMUClock *vm_clock;
FILE *logfile;
@@ -71,3 +72,27 @@ int qemu_set_fd_handler2(int fd,
void qemu_notify_event(void)
{
}
+
+QEMUTimer *qemu_new_timer(QEMUClock *clock, int scale,
+ QEMUTimerCB *cb, void *opaque)
+{
+ return qemu_malloc(1);
+}
+
+void qemu_free_timer(QEMUTimer *ts)
+{
+ qemu_free(ts);
+}
+
+void qemu_del_timer(QEMUTimer *ts)
+{
+}
+
+void qemu_mod_timer(QEMUTimer *ts, int64_t expire_time)
+{
+}
+
+int64_t qemu_get_clock_ns(QEMUClock *clock)
+{
+ return 0;
+}