From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TStks-0002fl-K1 for qemu-devel@nongnu.org; Mon, 29 Oct 2012 14:08:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TStko-0005eu-Fx for qemu-devel@nongnu.org; Mon, 29 Oct 2012 14:08:06 -0400 Received: from mail-da0-f45.google.com ([209.85.210.45]:48867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TStko-0005en-8y for qemu-devel@nongnu.org; Mon, 29 Oct 2012 14:08:02 -0400 Received: by mail-da0-f45.google.com with SMTP id n15so2388289dad.4 for ; Mon, 29 Oct 2012 11:08:01 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Mon, 29 Oct 2012 19:07:11 +0100 Message-Id: <1351534038-15503-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1351534038-15503-1-git-send-email-pbonzini@redhat.com> References: <1351534038-15503-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 04/11] sockets: use weak aliases instead of qemu-tool.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 +++++++ qemu-tool.c | 6 ------ 2 file modificati, 7 inserzioni(+), 6 rimozioni(-) diff --git a/qemu-sockets.c b/qemu-sockets.c index cfed9c5..225cd0c 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); diff --git a/qemu-tool.c b/qemu-tool.c index da4c05a..f2f9813 100644 --- a/qemu-tool.c +++ b/qemu-tool.c @@ -38,12 +38,6 @@ const char *qemu_get_vm_name(void) Monitor *cur_mon; -int monitor_get_fd(Monitor *mon, const char *name, Error **errp) -{ - error_setg(errp, "only QEMU supports file descriptor passing"); - return -1; -} - void vm_stop(RunState state) { abort(); -- 1.7.12.1