]> git.proxmox.com Git - mirror_qemu.git/commitdiff
sockets: use weak aliases instead of qemu-tool.c
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 29 Oct 2012 14:15:15 +0000 (15:15 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Oct 2012 08:18:43 +0000 (09:18 +0100)
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
qemu-tool.c

index cfed9c5a5bd9e14b68015a1be2f909eabfa73cc6..225cd0c162dbf9b0124e02e495c8eed0740eb70f 100644 (file)
@@ -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);
index da4c05aaf7b661fdabba3335bad1ebccafb3f55c..f2f98138ceaa1775c54e2e9401986fdfbe78af89 100644 (file)
@@ -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();