fix raw_aio_remove (Stefano Stabellini)
[qemu] / qemu-tool.c
index 63e2056..4dda5af 100644 (file)
@@ -26,6 +26,10 @@ struct QEMUBH
     void *opaque;
 };
 
+void qemu_service_io(void)
+{
+}
+
 void term_printf(const char *fmt, ...)
 {
 }
@@ -39,10 +43,8 @@ QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque)
     QEMUBH *bh;
 
     bh = qemu_malloc(sizeof(*bh));
-    if (bh) {
-        bh->cb = cb;
-        bh->opaque = opaque;
-    }
+    bh->cb = cb;
+    bh->opaque = opaque;
 
     return bh;
 }
@@ -77,7 +79,7 @@ int qemu_set_fd_handler2(int fd,
 
 int64_t qemu_get_clock(QEMUClock *clock)
 {
-    struct timeval tv;
-    gettimeofday(&tv, NULL);
+    qemu_timeval tv;
+    qemu_gettimeofday(&tv);
     return (tv.tv_sec * 1000000000LL + (tv.tv_usec * 1000)) / 1000000;
 }