qemu-devel
[Top][All Lists]
Advanced

[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: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH 15/18] qemu-sockets: add error propagation to inet_connect_addr
Date: Tue, 9 Oct 2012 14:28:26 -0300

On Tue, 09 Oct 2012 17:02:02 +0200
Paolo Bonzini <address@hidden> wrote:

> 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.

Right.

> The only obvious step is to remove QERR_ constants that are used just
> once. 

I agree.

> 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.

I don't fully agree. The best way to do this is to add new wrappers
to bind() or connect() that take an Error ** argument and not extend
the QERR_ macros. But I agree that we can do this later.

> Adding new QERR_ constants is somewhat harmful, but using the old ones
> absolutely is not.

Yes:

 Reviewed-by: Luiz Capitulino <address@hidden>



reply via email to

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