qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qemu-socket: Polish errors for connect() and li


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] qemu-socket: Polish errors for connect() and listen() failure
Date: Fri, 19 Sep 2014 19:16:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Luiz Capitulino <address@hidden> writes:

> On Fri, 19 Sep 2014 09:27:04 +0200
> Markus Armbruster <address@hidden> 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 <address@hidden>
>> ---
>>  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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]