From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIvgG-0008Qn-7W for qemu-devel@nongnu.org; Tue, 02 Oct 2012 02:10:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIvgD-0004mf-3j for qemu-devel@nongnu.org; Tue, 02 Oct 2012 02:10:07 -0400 Received: from plane.gmane.org ([80.91.229.3]:39893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIvgC-0004he-UW for qemu-devel@nongnu.org; Tue, 02 Oct 2012 02:10:05 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TIvfx-0004XA-8T for qemu-devel@nongnu.org; Tue, 02 Oct 2012 08:09:49 +0200 Received: from 93-34-169-1.ip50.fastwebnet.it ([93.34.169.1]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 02 Oct 2012 08:09:49 +0200 Received: from pbonzini by 93-34-169-1.ip50.fastwebnet.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 02 Oct 2012 08:09:49 +0200 From: Paolo Bonzini Date: Tue, 02 Oct 2012 08:09:20 +0200 Message-ID: References: <1349103144-6827-1-git-send-email-pbonzini@redhat.com> <1349103144-6827-5-git-send-email-pbonzini@redhat.com> <20121001141721.5ae57b52@doriath.home> <5069EA08.8050500@redhat.com> <20121001200507.62da4412@doriath.home> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit In-Reply-To: <20121001200507.62da4412@doriath.home> Subject: Re: [Qemu-devel] [PATCH v2 4/9] qemu-sockets: add error propagation to Unix socket functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Il 02/10/2012 01:05, Luiz Capitulino ha scritto: > On Mon, 01 Oct 2012 21:07:52 +0200 > Paolo Bonzini wrote: > >> Il 01/10/2012 19:17, Luiz Capitulino ha scritto: >>>>> if (bind(sock, (struct sockaddr*) &un, sizeof(un)) < 0) { >>>>> - fprintf(stderr, "bind(unix:%s): %s\n", un.sun_path, strerror(errno)); >>>>> + error_set(errp, QERR_SOCKET_BIND_FAILED); >>> This drops error information, making the error message worse. I believe >>> you have a reason to not use error_setg()? >> >> I was waiting for the end of the discussion on errno to add >> error_setg_errno. > > The decision was to not add errno now, right? I don't remember, but we can still add a function that takes an errno value and tacks on the strerror(errno). >>> Also, I see that in some hunks you do something like: >>> >>> - fd = unix_listen_opts(opts); >>> + fd = unix_listen_opts(opts, NULL); >>> >>> This will break printing the error message to the user. It's fine by me if >>> you do this only temporarily (ie. this is fixed by the next or a later patch), >>> but want to double check that you're aware of it. >> >> I want to avoid super-large patch series, so I would prefer to fix it >> later in the 1.3 development. > > We at least need to have the patches flying, I don't think it's ok to > break error reporting like that. I disagree because we still have two months before release, but I'll see what I can do. Paolo