Blue Swirl <blauwir...@gmail.com> writes: > On 3/17/10, Markus Armbruster <arm...@redhat.com> wrote: >> 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 <arm...@redhat.com> >> --- >> Makefile | 6 +++--- >> qemu-tool.c | 50 ++++++++++++++++---------------------------------- >> 2 files changed, 19 insertions(+), 37 deletions(-) >> >> diff --git a/Makefile b/Makefile >> index 2066c12..aad361e 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 97ca949..8d6d0ef 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,22 @@ void qemu_service_io(void) >> { >> } >> >> +Monitor *cur_mon; >> + >> +int monitor_cur_is_qmp(void) >> +{ >> + return 0; >> +} >> + >> +void monitor_set_error(Monitor *mon, QError *qerror) >> +{ >> + assert(0); > > Please use abort().
Why? I'd like to understand the rules to avoid unnecessary respins in the future. [...]