소스 검색

block: add missing socket_init() calls to tools

Any tool that uses sockets needs to call socket_init() in order to work
on the Windows platform.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20200825103850.119911-2-berrange@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Daniel P. Berrangé 5 년 전
부모
커밋
98c5d2e701
3개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      qemu-img.c
  2. 2 0
      qemu-io.c
  3. 1 0
      qemu-nbd.c

+ 2 - 0
qemu-img.c

@@ -41,6 +41,7 @@
 #include "qemu/log.h"
 #include "qemu/log.h"
 #include "qemu/main-loop.h"
 #include "qemu/main-loop.h"
 #include "qemu/module.h"
 #include "qemu/module.h"
+#include "qemu/sockets.h"
 #include "qemu/units.h"
 #include "qemu/units.h"
 #include "qom/object_interfaces.h"
 #include "qom/object_interfaces.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/block-backend.h"
@@ -5410,6 +5411,7 @@ int main(int argc, char **argv)
     signal(SIGPIPE, SIG_IGN);
     signal(SIGPIPE, SIG_IGN);
 #endif
 #endif
 
 
+    socket_init();
     error_init(argv[0]);
     error_init(argv[0]);
     module_call_init(MODULE_INIT_TRACE);
     module_call_init(MODULE_INIT_TRACE);
     qemu_init_exec_dir(argv[0]);
     qemu_init_exec_dir(argv[0]);

+ 2 - 0
qemu-io.c

@@ -25,6 +25,7 @@
 #include "qemu/config-file.h"
 #include "qemu/config-file.h"
 #include "qemu/readline.h"
 #include "qemu/readline.h"
 #include "qemu/log.h"
 #include "qemu/log.h"
+#include "qemu/sockets.h"
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qdict.h"
 #include "qom/object_interfaces.h"
 #include "qom/object_interfaces.h"
@@ -542,6 +543,7 @@ int main(int argc, char **argv)
     signal(SIGPIPE, SIG_IGN);
     signal(SIGPIPE, SIG_IGN);
 #endif
 #endif
 
 
+    socket_init();
     error_init(argv[0]);
     error_init(argv[0]);
     module_call_init(MODULE_INIT_TRACE);
     module_call_init(MODULE_INIT_TRACE);
     qemu_init_exec_dir(argv[0]);
     qemu_init_exec_dir(argv[0]);

+ 1 - 0
qemu-nbd.c

@@ -599,6 +599,7 @@ int main(int argc, char **argv)
     signal(SIGPIPE, SIG_IGN);
     signal(SIGPIPE, SIG_IGN);
 #endif
 #endif
 
 
+    socket_init();
     error_init(argv[0]);
     error_init(argv[0]);
     module_call_init(MODULE_INIT_TRACE);
     module_call_init(MODULE_INIT_TRACE);
     qcrypto_init(&error_fatal);
     qcrypto_init(&error_fatal);