[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 5/6] error: Link qemu-img, qemu-nbd, qemu-io with
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH v2 5/6] error: Link qemu-img, qemu-nbd, qemu-io with qemu-error.o |
Date: |
Mon, 22 Mar 2010 10:29:04 +0100 |
The location tracking interface is used by code shared with qemi-img,
qemu-nbd and qemu-io, so it needs to be available there. Commit
827b0813 provides it in a rather hamfisted way: it adds a dummy
implementation to qemu-tool.c.
It's cleaner to provide the real thing, and put a few more dummy
monitor functions into qemu-tool.c.
Signed-off-by: Markus Armbruster <address@hidden>
---
Makefile | 6 +++---
qemu-tool.c | 49 +++++++++++++++----------------------------------
2 files changed, 18 insertions(+), 37 deletions(-)
diff --git a/Makefile b/Makefile
index 57c354d..a404fda 100644
--- a/Makefile
+++ b/Makefile
@@ -129,11 +129,11 @@ bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
qemu-img.o: qemu-img-cmds.h
qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o: $(GENERATED_HEADERS)
-qemu-img$(EXESUF): qemu-img.o qemu-tool.o $(block-obj-y) $(qobject-obj-y)
+qemu-img$(EXESUF): qemu-img.o qemu-tool.o qemu-error.o $(block-obj-y)
$(qobject-obj-y)
-qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o $(block-obj-y) $(qobject-obj-y)
+qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o qemu-error.o $(block-obj-y)
$(qobject-obj-y)
-qemu-io$(EXESUF): qemu-io.o qemu-tool.o cmd.o $(block-obj-y) $(qobject-obj-y)
+qemu-io$(EXESUF): qemu-io.o cmd.o qemu-tool.o qemu-error.o $(block-obj-y)
$(qobject-obj-y)
qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
$(call quiet-command,sh $(SRC_PATH)/hxtool -h < $< > $@," GEN $@")
diff --git a/qemu-tool.c b/qemu-tool.c
index dda752b..b39af86 100644
--- a/qemu-tool.c
+++ b/qemu-tool.c
@@ -15,7 +15,6 @@
#include "monitor.h"
#include "qemu-timer.h"
#include "qemu-log.h"
-#include "qemu-error.h"
#include <sys/time.h>
@@ -33,6 +32,21 @@ void qemu_service_io(void)
{
}
+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)
+{
+}
+
void monitor_printf(Monitor *mon, const char *fmt, ...)
{
}
@@ -103,36 +117,3 @@ int64_t qemu_get_clock(QEMUClock *clock)
qemu_gettimeofday(&tv);
return (tv.tv_sec * 1000000000LL + (tv.tv_usec * 1000)) / 1000000;
}
-
-Location *loc_push_restore(Location *loc)
-{
- return loc;
-}
-
-Location *loc_push_none(Location *loc)
-{
- return loc;
-}
-
-Location *loc_pop(Location *loc)
-{
- return loc;
-}
-
-Location *loc_save(Location *loc)
-{
- return loc;
-}
-
-void loc_restore(Location *loc)
-{
-}
-
-void error_report(const char *fmt, ...)
-{
- va_list args;
-
- va_start(args, fmt);
- vfprintf(stderr, fmt, args);
- va_end(args);
-}
--
1.6.6.1
- [Qemu-devel] [PATCH v2 0/6] error: Clean up after recent changes, Markus Armbruster, 2010/03/22
- [Qemu-devel] [PATCH v2 3/6] error: Trim includes after "Infrastructure to track locations...", Markus Armbruster, 2010/03/22
- [Qemu-devel] [PATCH v2 4/6] error: Make use of error_set_progname() optional, Markus Armbruster, 2010/03/22
- [Qemu-devel] [PATCH v2 5/6] error: Link qemu-img, qemu-nbd, qemu-io with qemu-error.o,
Markus Armbruster <=
- [Qemu-devel] [PATCH v2 1/6] error: Trim includes after "Move qemu_error & friends...", Markus Armbruster, 2010/03/22
- [Qemu-devel] [PATCH v2 2/6] error: Trim includes in qerror.c, Markus Armbruster, 2010/03/22
- [Qemu-devel] [PATCH v2 6/6] error: Move qerror_report() from qemu-error.[ch] to qerror.[ch], Markus Armbruster, 2010/03/22
- [Qemu-devel] Re: [PATCH v2 0/6] error: Clean up after recent changes, Luiz Capitulino, 2010/03/23
- Re: [Qemu-devel] [PATCH v2 0/6] error: Clean up after recent changes, Aurelien Jarno, 2010/03/27