WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] ioemu: config cleanup re AF_UNIX sockets

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ioemu: config cleanup re AF_UNIX sockets on non-Windows
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 07 Feb 2008 11:00:29 -0800
Delivery-date: Thu, 07 Feb 2008 11:00:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1202375952 0
# Node ID 3821e39cc1a056921c65612154f0946638be25e6
# Parent  0672d5b11262be541f12e74e604f10a04d319cfa
ioemu: config cleanup re AF_UNIX sockets on non-Windows

Here is what I wrote in my submission to qemu upstream:

 The patch below makes it possible to disable AF_UNIX (unix-domain)
 sockets in host environments which do not define _WIN32, by adding
 -DNO_UNIX_SOCKETS to the compiler flags.  This is useful in the
 effectively-embedded qemu host which are going to be using for device
 emulation in Xen.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/ioemu/qemu_socket.h |    7 +++++++
 tools/ioemu/vl.c          |    2 +-
 tools/ioemu/vnc.c         |    2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff -r 0672d5b11262 -r 3821e39cc1a0 tools/ioemu/qemu_socket.h
--- a/tools/ioemu/qemu_socket.h Thu Feb 07 09:16:20 2008 +0000
+++ b/tools/ioemu/qemu_socket.h Thu Feb 07 09:19:12 2008 +0000
@@ -14,12 +14,19 @@
 #define EINTR       WSAEINTR
 #define EINPROGRESS WSAEINPROGRESS
 
+#ifndef NO_UNIX_SOCKETS
+#define NO_UNIX_SOCKETS 1
+#endif
+
 #else
 
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
+
+#ifndef NO_UNIX_SOCKETS
 #include <sys/un.h>
+#endif
 
 #define socket_error() errno
 #define closesocket(s) close(s)
diff -r 0672d5b11262 -r 3821e39cc1a0 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Thu Feb 07 09:16:20 2008 +0000
+++ b/tools/ioemu/vl.c  Thu Feb 07 09:19:12 2008 +0000
@@ -3127,7 +3127,7 @@ int parse_host_port(struct sockaddr_in *
     return 0;
 }
 
-#ifndef _WIN32
+#ifndef NO_UNIX_SOCKETS
 static int parse_unix_path(struct sockaddr_un *uaddr, const char *str)
 {
     const char *p;
diff -r 0672d5b11262 -r 3821e39cc1a0 tools/ioemu/vnc.c
--- a/tools/ioemu/vnc.c Thu Feb 07 09:16:20 2008 +0000
+++ b/tools/ioemu/vnc.c Thu Feb 07 09:19:12 2008 +0000
@@ -2401,7 +2401,7 @@ int vnc_display_open(DisplayState *ds, c
        }
 #endif
     }
-#ifndef _WIN32
+#ifndef NO_UNIX_SOCKETS
     if (strstart(display, "unix:", &p)) {
        addr = (struct sockaddr *)&uaddr;
        addrlen = sizeof(uaddr);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] ioemu: config cleanup re AF_UNIX sockets on non-Windows, Xen patchbot-unstable <=