From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XV1ot-0006aJ-S5 for qemu-devel@nongnu.org; Fri, 19 Sep 2014 13:18:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XV1on-0004KV-NU for qemu-devel@nongnu.org; Fri, 19 Sep 2014 13:18:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XV1on-0004K6-Du for qemu-devel@nongnu.org; Fri, 19 Sep 2014 13:18:01 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8JHHtFX028198 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 19 Sep 2014 13:17:56 -0400 Date: Fri, 19 Sep 2014 13:17:53 -0400 From: Luiz Capitulino Message-ID: <20140919131753.28089277@redhat.com> In-Reply-To: <87lhpf7cpz.fsf@blackfin.pond.sub.org> References: <1411111624-3064-1-git-send-email-armbru@redhat.com> <20140919130529.0ca72b0f@redhat.com> <87lhpf7cpz.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qemu-socket: Polish errors for connect() and listen() failure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: akong@redhat.com, qemu-devel@nongnu.org On Fri, 19 Sep 2014 19:16:08 +0200 Markus Armbruster wrote: > Luiz Capitulino writes: > > > On Fri, 19 Sep 2014 09:27:04 +0200 > > Markus Armbruster wrote: > > > >> connect() doesn't "connect to socket", it connects a socket to an > >> address and, if it's of type SOCK_STREAM, initiates a connection. > >> Scratch "to". > >> > >> listen() does "set socket to listening mode", but it sounds awkward. > >> Change to "listen on socket". > >> > >> Signed-off-by: Markus Armbruster > >> --- > >> include/qapi/qmp/qerror.h | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h > >> index 902d1a7..774e75d 100644 > >> --- a/include/qapi/qmp/qerror.h > >> +++ b/include/qapi/qmp/qerror.h > >> @@ -155,10 +155,10 @@ void qerror_report_err(Error *err); > >> ERROR_CLASS_GENERIC_ERROR, "this feature or command is not currently supported" > >> > >> #define QERR_SOCKET_CONNECT_FAILED \ > >> - ERROR_CLASS_GENERIC_ERROR, "Failed to connect to socket" > >> + ERROR_CLASS_GENERIC_ERROR, "Failed to connect socket" > >> > >> #define QERR_SOCKET_LISTEN_FAILED \ > >> - ERROR_CLASS_GENERIC_ERROR, "Failed to set socket to listening mode" > >> + ERROR_CLASS_GENERIC_ERROR, "Failed to listen on socket" > >> > >> #define QERR_SOCKET_BIND_FAILED \ > >> ERROR_CLASS_GENERIC_ERROR, "Failed to bind socket" > > > > The word fixing is good, but what about getting rid of the QERR_ macros > > too? > > > > The easiest way to do this would be to just replace each macro with its > > text. If the string duplication bothers you (it doesn't bother me very > > much, btw) you could create wrappers say qemu_listen() or listen_errp() > > or whatever. > > I can do that on top. Okay? OK.