From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJoQy-0002Jy-8K for qemu-devel@nongnu.org; Thu, 04 Oct 2012 12:38:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJoQr-000580-DB for qemu-devel@nongnu.org; Thu, 04 Oct 2012 12:38:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJoQq-00057u-Tp for qemu-devel@nongnu.org; Thu, 04 Oct 2012 12:37:53 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q94Gbq7A007131 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 4 Oct 2012 12:37:52 -0400 Date: Thu, 4 Oct 2012 13:38:45 -0300 From: Luiz Capitulino Message-ID: <20121004133845.2f9d5191@doriath.home> In-Reply-To: <1349275025-5093-4-git-send-email-pbonzini@redhat.com> References: <1349275025-5093-1-git-send-email-pbonzini@redhat.com> <1349275025-5093-4-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 03/18] qemu-sockets: unix_listen and unix_connect are portable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Wed, 3 Oct 2012 16:36:50 +0200 Paolo Bonzini wrote: > They are just wrappers and do not need a Win32-specific version. > > Signed-off-by: Paolo Bonzini Reviewed-by: Luiz Capitulino > --- > qemu-sockets.c | 49 +++++++++++++++++-------------------------------- > 1 file modificato, 17 inserzioni(+), 32 rimozioni(-) > > diff --git a/qemu-sockets.c b/qemu-sockets.c > index 5cf2b32..79c7b66 100644 > --- a/qemu-sockets.c > +++ b/qemu-sockets.c > @@ -731,6 +731,23 @@ int unix_connect_opts(QemuOpts *opts, Error **errp) > return sock; > } > > +#else > + > +int unix_listen_opts(QemuOpts *opts, Error **errp) > +{ > + error_setg(errp, "unix sockets are not available on windows"); > + errno = ENOTSUP; > + return -1; > +} > + > +int unix_connect_opts(QemuOpts *opts, Error **errp) > +{ > + error_setg(errp, "unix sockets are not available on windows"); > + errno = ENOTSUP; > + return -1; > +} > +#endif > + > /* compatibility wrapper */ > int unix_listen(const char *str, char *ostr, int olen, Error **errp) > { > @@ -773,38 +790,6 @@ int unix_connect(const char *path, Error **errp) > return sock; > } > > -#else > - > -int unix_listen_opts(QemuOpts *opts, Error **errp) > -{ > - error_setg(errp, "unix sockets are not available on windows"); > - errno = ENOTSUP; > - return -1; > -} > - > -int unix_connect_opts(QemuOpts *opts, Error **errp) > -{ > - error_setg(errp, "unix sockets are not available on windows"); > - errno = ENOTSUP; > - return -1; > -} > - > -int unix_listen(const char *path, char *ostr, int olen, Error **errp) > -{ > - error_setg(errp, "unix sockets are not available on windows"); > - errno = ENOTSUP; > - return -1; > -} > - > -int unix_connect(const char *path, Error **errp) > -{ > - error_setg(errp, "unix sockets are not available on windows"); > - errno = ENOTSUP; > - return -1; > -} > - > -#endif > - > #ifdef _WIN32 > static void socket_cleanup(void) > {