[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 15/18] qemu-sockets: add error propagation to in
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 15/18] qemu-sockets: add error propagation to inet_connect_addr |
Date: |
Tue, 09 Oct 2012 17:02:02 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
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
- Re: [Qemu-devel] [PATCH 11/18] nbd: ask and print error information from qemu-sockets, (continued)
[Qemu-devel] [PATCH 12/18] qemu-ga: ask and print error information from qemu-sockets, Paolo Bonzini, 2012/10/03
[Qemu-devel] [PATCH 10/18] qemu-char: ask and print error information from qemu-sockets, Paolo Bonzini, 2012/10/03
[Qemu-devel] [PATCH 17/18] qemu-sockets: add error propagation to inet_parse, Paolo Bonzini, 2012/10/03
[Qemu-devel] [PATCH 15/18] qemu-sockets: add error propagation to inet_connect_addr, Paolo Bonzini, 2012/10/03
[Qemu-devel] [PATCH 16/18] qemu-sockets: add error propagation to inet_dgram_opts, Paolo Bonzini, 2012/10/03
[Qemu-devel] [PATCH 13/18] vnc: add error propagation to vnc_display_open, Paolo Bonzini, 2012/10/03
[Qemu-devel] [PATCH 14/18] qemu-sockets: include strerror or gai_strerror output in error messages, Paolo Bonzini, 2012/10/03
[Qemu-devel] [PATCH 18/18] qemu-sockets: add error propagation to Unix socket functions, Paolo Bonzini, 2012/10/03