From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 04/11] sockets: use weak aliases instead of qemu-tool.c
Date: Mon, 29 Oct 2012 19:07:11 +0100 [thread overview]
Message-ID: <1351534038-15503-5-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1351534038-15503-1-git-send-email-pbonzini@redhat.com>
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 <pbonzini@redhat.com>
---
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
next prev parent reply other threads:[~2012-10-29 18:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-29 18:07 [Qemu-devel] [PATCH 00/11] Trim dependencies of qemu-ga, vscclient, tests Paolo Bonzini
2012-10-29 18:07 ` [Qemu-devel] [PATCH 01/11] janitor: move iovector functions out of cutils.c Paolo Bonzini
2012-10-29 18:07 ` [Qemu-devel] [PATCH 02/11] build: move cutils.o and qemu-timer-common.o to oslib-obj-y Paolo Bonzini
2012-10-29 18:07 ` [Qemu-devel] [PATCH 03/11] compiler: use weak aliases to provide default definitions Paolo Bonzini
2012-10-29 18:07 ` Paolo Bonzini [this message]
2012-10-29 18:07 ` [Qemu-devel] [PATCH 05/11] fdsets: use weak aliases instead of qemu-tool.c/qemu-user.c Paolo Bonzini
2012-10-29 18:07 ` [Qemu-devel] [PATCH 06/11] iohandler: add weak alias in qemu-sockets.c, for qemu-ga Paolo Bonzini
2012-10-29 18:07 ` [Qemu-devel] [PATCH 07/11] win32: add weak version of qemu_fd_register Paolo Bonzini
2012-10-29 18:07 ` [Qemu-devel] [PATCH 08/11] qemu-timer: make initialization functions idempotent Paolo Bonzini
2012-10-29 18:07 ` [Qemu-devel] [PATCH 09/11] main-loop: unify qemu_init_main_loop between QEMU and tools Paolo Bonzini
2012-10-29 18:07 ` [Qemu-devel] [PATCH 10/11] qemu-tool: do not depend on qemu-timer.c Paolo Bonzini
2012-10-29 18:07 ` [Qemu-devel] [PATCH 11/11] build: do not include main loop where it is not actually used Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1351534038-15503-5-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).