vmstate: add support for arrays of uint16_t
[qemu] / qemu-tool.c
index 74d4b4f..ba24aa2 100644 (file)
  */
 
 #include "qemu-common.h"
-#include "console.h"
+#include "monitor.h"
 #include "sysemu.h"
 #include "qemu-timer.h"
+#include "qemu-log.h"
 
 #include <sys/time.h>
 
 QEMUClock *rt_clock;
 
+FILE *logfile;
+
 struct QEMUBH
 {
     QEMUBHFunc *cb;
@@ -30,11 +33,13 @@ void qemu_service_io(void)
 {
 }
 
-void term_printf(const char *fmt, ...)
+Monitor *cur_mon;
+
+void monitor_printf(Monitor *mon, const char *fmt, ...)
 {
 }
 
-void term_print_filename(const char *filename)
+void monitor_print_filename(Monitor *mon, const char *filename)
 {
 }
 
@@ -43,10 +48,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;
 }
@@ -81,7 +84,7 @@ int qemu_set_fd_handler2(int fd,
 
 int64_t qemu_get_clock(QEMUClock *clock)
 {
-    struct timeval tv;
+    qemu_timeval tv;
     qemu_gettimeofday(&tv);
     return (tv.tv_sec * 1000000000LL + (tv.tv_usec * 1000)) / 1000000;
 }