From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCRll-0003BB-2h for qemu-devel@nongnu.org; Fri, 14 Sep 2012 05:01:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCRlf-0005WT-9Y for qemu-devel@nongnu.org; Fri, 14 Sep 2012 05:01:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCRlf-0005WO-0n for qemu-devel@nongnu.org; Fri, 14 Sep 2012 05:00:55 -0400 From: Juan Quintela In-Reply-To: <1347562697-15411-2-git-send-email-owasserm@redhat.com> (Orit Wasserman's message of "Thu, 13 Sep 2012 21:58:15 +0300") References: <1347562697-15411-1-git-send-email-owasserm@redhat.com> <1347562697-15411-2-git-send-email-owasserm@redhat.com> Date: Fri, 14 Sep 2012 10:58:55 +0200 Message-ID: <874nn1t1yo.fsf@elfo.mitica> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3 1/3] Refactor inet_connect_opts function Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Orit Wasserman Cc: kwolf@redhat.com, aliguori@us.ibm.com, mst@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, mdroth@linux.vnet.ibm.com, lcapitulino@redhat.com, pbonzini@redhat.com, akong@redhat.com Orit Wasserman wrote: > From: "Michael S. Tsirkin" > > refactor address resolution code to fix nonblocking connect > remove getnameinfo call > > Signed-off-by: Michael S. Tsirkin > Signed-off-by: Amos Kong > Signed-off-by: Orit Wasserman Reviewed-by: Juan Quintela > -int inet_connect_opts(QemuOpts *opts, bool *in_progress, Error **errp) > +#ifdef _WIN32 > +#define QEMU_SOCKET_RC_INPROGRESS(rc) \ > + ((rc) == -EINPROGRESS || rc == -EWOULDBLOCK || rc == -WSAEALREADY) > +#else > +#define QEMU_SOCKET_RC_INPROGRESS(rc) \ > + ((rc) == -EINPROGRESS) > +#endif Not specific to this series, but this is used all around in qemu. Should we put it into osdep.h and refactor?