From d249e1fc4fda57399fe64b3c0290d5d585fdf2e5 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 29 Oct 2012 15:15:15 +0100 Subject: sockets: use weak aliases instead of qemu-tool.c qemu-tool.c has its own (largeish) set of dependencies. Weak aliases can be placed directly where people use them, and do not contribute to increasing the dependencies of generic utility files. Signed-off-by: Paolo Bonzini --- qemu-sockets.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'qemu-sockets.c') diff --git a/qemu-sockets.c b/qemu-sockets.c index cfed9c5a5b..225cd0c162 100644 --- a/qemu-sockets.c +++ b/qemu-sockets.c @@ -967,3 +967,10 @@ int socket_init(void) #endif return 0; } + +static int default_monitor_get_fd(Monitor *mon, const char *name, Error **errp) +{ + error_setg(errp, "only QEMU supports file descriptor passing"); + return -1; +} +QEMU_WEAK_ALIAS(monitor_get_fd, default_monitor_get_fd); -- cgit v1.2.3 From 462016d2da393b743ba97552521378e7de2a4c7f Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 29 Oct 2012 15:23:16 +0100 Subject: iohandler: add weak alias in qemu-sockets.c, for qemu-ga Signed-off-by: Paolo Bonzini --- qemu-sockets.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'qemu-sockets.c') diff --git a/qemu-sockets.c b/qemu-sockets.c index 225cd0c162..f2a637165b 100644 --- a/qemu-sockets.c +++ b/qemu-sockets.c @@ -974,3 +974,14 @@ static int default_monitor_get_fd(Monitor *mon, const char *name, Error **errp) return -1; } QEMU_WEAK_ALIAS(monitor_get_fd, default_monitor_get_fd); + +static int default_qemu_set_fd_handler2(int fd, + IOCanReadHandler *fd_read_poll, + IOHandler *fd_read, + IOHandler *fd_write, + void *opaque) + +{ + abort(); +} +QEMU_WEAK_ALIAS(qemu_set_fd_handler2, default_qemu_set_fd_handler2); -- cgit v1.2.3