diff options
author | Kevin Wolf <kwolf@redhat.com> | 2020-02-24 15:30:02 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-03-06 17:21:28 +0100 |
commit | 6ede81d576ddc8e1f745494a51345328bd3f4d76 (patch) | |
tree | 1d064865c02c29005ffcb5d9d96e696e8cc00d64 /stubs | |
parent | 5e6911cf11e726e6a951824bed305191e568287a (diff) | |
download | qemu-6ede81d576ddc8e1f745494a51345328bd3f4d76.zip qemu-6ede81d576ddc8e1f745494a51345328bd3f4d76.tar.gz qemu-6ede81d576ddc8e1f745494a51345328bd3f4d76.tar.bz2 |
stubs: Update monitor stubs for qemu-storage-daemon
Before we can add the monitor to qemu-storage-daemon, we need to add a
stubs for monitor_fdsets_cleanup().
We also need to make sure that stubs that are actually implemented in
the monitor core aren't linked to qemu-storage-daemon so that we don't
get linker errors because of duplicate symbols. This is achieved by
moving the stubs in question to a new file stubs/monitor-core.c.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20200224143008.13362-15-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'stubs')
-rw-r--r-- | stubs/Makefile.objs | 1 | ||||
-rw-r--r-- | stubs/monitor-core.c | 21 | ||||
-rw-r--r-- | stubs/monitor.c | 15 |
3 files changed, 24 insertions, 13 deletions
diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index 24062ce..45be5dc 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -19,6 +19,7 @@ stub-obj-y += machine-init-done.o stub-obj-y += migr-blocker.o stub-obj-y += change-state-handler.o stub-obj-y += monitor.o +stub-obj-y += monitor-core.o stub-obj-y += notify-event.o stub-obj-y += qtest.o stub-obj-y += replay.o diff --git a/stubs/monitor-core.c b/stubs/monitor-core.c new file mode 100644 index 0000000..403c00a --- /dev/null +++ b/stubs/monitor-core.c @@ -0,0 +1,21 @@ +#include "qemu/osdep.h" +#include "monitor/monitor.h" +#include "qemu-common.h" +#include "qapi/qapi-emit-events.h" + +__thread Monitor *cur_mon; + +void monitor_init_qmp(Chardev *chr, bool pretty) +{ +} + +void qapi_event_emit(QAPIEvent event, QDict *qdict) +{ +} + +int monitor_vprintf(Monitor *mon, const char *fmt, va_list ap) +{ + abort(); +} + + diff --git a/stubs/monitor.c b/stubs/monitor.c index c3e9a2e..9403f8e 100644 --- a/stubs/monitor.c +++ b/stubs/monitor.c @@ -1,14 +1,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "qapi/qapi-emit-events.h" #include "monitor/monitor.h" - -__thread Monitor *cur_mon; - -int monitor_vprintf(Monitor *mon, const char *fmt, va_list ap) -{ - abort(); -} +#include "../monitor/monitor-internal.h" int monitor_get_fd(Monitor *mon, const char *name, Error **errp) { @@ -16,14 +9,10 @@ int monitor_get_fd(Monitor *mon, const char *name, Error **errp) return -1; } -void monitor_init_qmp(Chardev *chr, bool pretty) -{ -} - void monitor_init_hmp(Chardev *chr, bool use_readline) { } -void qapi_event_emit(QAPIEvent event, QDict *qdict) +void monitor_fdsets_cleanup(void) { } |