Patchwork fix chardev_init for win32

login
register
mail settings
Submitter TeLeMan
Date Jan. 5, 2010, 1:45 a.m.
Message ID <a38b25541001041745hf825a20j3697f46d4bc5f184@mail.gmail.com>
Download mbox | patch
Permalink /patch/42205/
State New
Headers show

Comments

TeLeMan - Jan. 5, 2010, 1:45 a.m.
Before calling chardev_init_func(), socket_init() should be called on win32.

---
 vl.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
Anthony Liguori - Jan. 8, 2010, 4:50 p.m.
On 01/04/2010 07:45 PM, TeLeMan wrote:
> Before calling chardev_init_func(), socket_init() should be called on win32.
>    

Needs a Signed-off-by

Regards,

Anthony Liguori

> ---
>   vl.c |    8 ++++----
>   1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 0f59142..3b39cad 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -5768,6 +5768,10 @@ int main(int argc, char **argv, char **envp)
>       if (default_vga)
>           vga_interface_type = VGA_CIRRUS;
>
> +#ifdef _WIN32
> +    socket_init();
> +#endif
> +
>       if (qemu_opts_foreach(&qemu_chardev_opts, chardev_init_func, NULL, 1) != 0)
>           exit(1);
>
> @@ -5873,10 +5877,6 @@ int main(int argc, char **argv, char **envp)
>           init_icount_adjust();
>       }
>
> -#ifdef _WIN32
> -    socket_init();
> -#endif
> -
>       if (net_init_clients()<  0) {
>           exit(1);
>       }
>

Patch

diff --git a/vl.c b/vl.c
index 0f59142..3b39cad 100644
--- a/vl.c
+++ b/vl.c
@@ -5768,6 +5768,10 @@  int main(int argc, char **argv, char **envp)
     if (default_vga)
         vga_interface_type = VGA_CIRRUS;

+#ifdef _WIN32
+    socket_init();
+#endif
+
     if (qemu_opts_foreach(&qemu_chardev_opts, chardev_init_func, NULL, 1) != 0)
         exit(1);

@@ -5873,10 +5877,6 @@  int main(int argc, char **argv, char **envp)
         init_icount_adjust();
     }

-#ifdef _WIN32
-    socket_init();
-#endif
-
     if (net_init_clients() < 0) {
         exit(1);
     }