From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLbKH-0000lX-9m for qemu-devel@nongnu.org; Tue, 09 Oct 2012 11:02:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLbK8-0005Af-BF for qemu-devel@nongnu.org; Tue, 09 Oct 2012 11:02:28 -0400 Received: from mail-pb0-f45.google.com ([209.85.160.45]:62102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLbK8-0005AI-5S for qemu-devel@nongnu.org; Tue, 09 Oct 2012 11:02:20 -0400 Received: by mail-pb0-f45.google.com with SMTP id rp2so5307478pbb.4 for ; Tue, 09 Oct 2012 08:02:19 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <50743C6A.9070206@redhat.com> Date: Tue, 09 Oct 2012 17:02:02 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1349275025-5093-1-git-send-email-pbonzini@redhat.com> <1349275025-5093-16-git-send-email-pbonzini@redhat.com> <20121009115827.486356cb@doriath.home> In-Reply-To: <20121009115827.486356cb@doriath.home> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 15/18] qemu-sockets: add error propagation to inet_connect_addr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel@nongnu.org Il 09/10/2012 16:58, Luiz Capitulino ha scritto: >> > + error_set_errno(errp, errno, QERR_SOCKET_CONNECT_FAILED); > The patch look fine, but as I said in my previous email I really dislike > seeing QERR_ macros usage in new code. If the problem here is to duplicate > the error message, then maybe we could put this connect() block in a wrapper. Again: one thing at a time. The only obvious step is to remove QERR_ constants that are used just once. Everything else should be done carefully because if later you decide to add something to the errors (for example the bind or connect argument) you have no protection against typos, etc. Adding new QERR_ constants is somewhat harmful, but using the old ones absolutely is not. Paolo