diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-10-29 15:15:15 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-10-30 09:18:43 +0100 |
commit | d249e1fc4fda57399fe64b3c0290d5d585fdf2e5 (patch) | |
tree | 061830e1691fffe250d7d5503822a6877e9ed672 | |
parent | 67d223be90178f7142b4f566358cea446af8df74 (diff) |
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 <pbonzini@redhat.com>
-rw-r--r-- | qemu-sockets.c | 7 | ||||
-rw-r--r-- | qemu-tool.c | 6 |
2 files changed, 7 insertions, 6 deletions
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); diff --git a/qemu-tool.c b/qemu-tool.c index da4c05aaf7..f2f98138ce 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(); |