From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIJDU-0000mT-AS for qemu-devel@nongnu.org; Wed, 20 Mar 2013 09:38:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIJDP-000572-55 for qemu-devel@nongnu.org; Wed, 20 Mar 2013 09:38:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34867) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIJDO-00056i-TT for qemu-devel@nongnu.org; Wed, 20 Mar 2013 09:38:03 -0400 Date: Wed, 20 Mar 2013 14:37:59 +0100 From: Kevin Wolf Message-ID: <20130320133758.GI3074@dhcp-200-207.str.redhat.com> References: <1362566886-14073-1-git-send-email-kwolf@redhat.com> <513722BD.6010503@redhat.com> <20130306111126.GA2285@dhcp-200-207.str.redhat.com> <513756D5.1020506@redhat.com> <20130319163451.205bc2cd@doriath> <20130320083934.GA3074@dhcp-200-207.str.redhat.com> <20130320085712.4983f384@doriath> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130320085712.4983f384@doriath> Subject: Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: Paolo Bonzini , aliguori@us.ibm.com, Laszlo Ersek , qemu-devel@nongnu.org Am 20.03.2013 um 13:57 hat Luiz Capitulino geschrieben: > On Wed, 20 Mar 2013 09:39:34 +0100 > Kevin Wolf wrote: > > > Am 19.03.2013 um 21:34 hat Luiz Capitulino geschrieben: > > > inet_connect_addr() has two users: inet_connect_opts() and wait_for_connect(), > > > with this patch both of them are now ignoring errors from inet_connect_addr(). > > > > > > Suggested solution: refactor inet_connect_addr() to return an errno value. > > > Callers use error_set() when they want to report an error upward. > > > > Doesn't change the problem that you need to know when to set a return > > value != 0. So it doesn't help, but you'd lose some error information. > > My real point is that it's easier to check against errno to find out > the error cause (compared to using Error for that). You mean if the caller has to distinguish between different error codes? I think I would agree that avoiding Error can be a good way then if it doesn't lose error information. If we would lose information, using error classes other than generic would be acceptable, right? In the specific case, I don't think the callers make any difference and all errors are just errors, so this is mostly about the theory. Kevin