From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwDJQ-0003In-Ld for qemu-devel@nongnu.org; Tue, 31 Jul 2012 10:20:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwDJJ-0006Xo-Sh for qemu-devel@nongnu.org; Tue, 31 Jul 2012 10:20:40 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:58106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwDJI-0006Vq-Jk for qemu-devel@nongnu.org; Tue, 31 Jul 2012 10:20:33 -0400 Received: by yenl1 with SMTP id l1so5930770yen.4 for ; Tue, 31 Jul 2012 07:20:17 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5017E999.8070404@redhat.com> Date: Tue, 31 Jul 2012 16:20:09 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <5017C453.8080800@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/2] net: Make -netdev socket,listen= work List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Laszlo Ersek , qemu-devel@nongnu.org, Stefan Hajnoczi , Zhi Yong Wu Il 31/07/2012 15:04, Stefan Hajnoczi ha scritto: >> > Looks good to me. A minor nit: 2/2 keeps the close(s->fd) call (instead >> > of calling closesocket(s->fd), like in eoc handling) in >> > net_socket_cleanup(). > The reason I didn't change close(2) to closesocket() is because > -netdev socket,fd= can pass arbitrary file descriptors. I suspect > only real socket objects will work but we basically don't know what > the passed file descriptor is. This is the reason why I didn't feel > 100% happy converting it to closesocket(). > -netdev socket,fd= is probably not usable from Windows, so no problem using close(). Paolo