From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHu2L-0004G6-46 for qemu-devel@nongnu.org; Wed, 22 Jul 2015 09:26:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHu2K-0001Z0-Aa for qemu-devel@nongnu.org; Wed, 22 Jul 2015 09:26:17 -0400 Date: Wed, 22 Jul 2015 09:26:00 -0400 From: Jeff Cody Message-ID: <20150722132600.GD21772@localhost.localdomain> References: <1437570442-30203-1-git-send-email-rjones@redhat.com> <1437570442-30203-2-git-send-email-rjones@redhat.com> <20150722131749.GC21772@localhost.localdomain> <20150722132218.GB22921@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150722132218.GB22921@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] block/ssh: Avoid segfault if inet_connect doesn't set errno. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Richard W.M. Jones" Cc: kwolf@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org On Wed, Jul 22, 2015 at 02:22:18PM +0100, Richard W.M. Jones wrote: > On Wed, Jul 22, 2015 at 09:17:49AM -0400, Jeff Cody wrote: > > Both nbd and sheepdog handle it in a similar fashion (i.e. not relying > > on errno being set on inet_connect failure). However, both nbd and > > sheepdog use -EIO as the error return, and I think that makes more > > sense. What do you think? > > If you prefer -- I don't mind as long as it doesn't segfault :-) > I think I would - mainly for consistency, but also because -EIO better describes all the various failures that may occur in inet_connect(). Thanks! Jeff