qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Allow AF_UNIX sockets to be disabled on non-Win


From: Ian Jackson
Subject: Re: [Qemu-devel] [PATCH] Allow AF_UNIX sockets to be disabled on non-Windows
Date: Fri, 25 Jan 2008 15:15:11 +0000

Anthony Liguori writes ("Re: [Qemu-devel] [PATCH] Allow AF_UNIX sockets to be 
disabled on non-Windows"):
> Presumably, this is because you're compiling for MiniOS?  Why not just 
> add a _MINIOS define and then add an appropriate #ifndef.

Yes.  We'll probably add a MINIOS define, yes (at the moment our tree
is too divergent; these patches are an attempt at restoring some
semblance of sanity to the Xen situation).

But when the existing code says

     }
 #ifndef _WIN32
     if (strstart(display, "unix:", &p)) {
        addr = (struct sockaddr *)&uaddr;
        addrlen = sizeof(uaddr);
     etc.

then changing it to something like

 #if !(defined(_WIN32) || defined(MINIOS)

seems very ugly.

The information about whether a host platform supports AF_UNIX should
be in one place, and there should be one place to turn the
functionality on and off in qemu.  slirp already uses NO_UNIX_SOCKETS
so I just reused that name, although unfortunately it's still set in
two different places.

Ian.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]