qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 15/34] net: inet_connect(), inet_connect_opts():


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH 15/34] net: inet_connect(), inet_connect_opts(): return -errno
Date: Thu, 2 Aug 2012 10:41:35 -0300

On Wed,  1 Aug 2012 22:02:35 -0300
Luiz Capitulino <address@hidden> wrote:

> Next commit wants to use this.
> 
> Signed-off-by: Luiz Capitulino <address@hidden>
> ---
> 
> This patch is an interesting case, because one of the goal of the error
> format that's being replaced was that callers could use it to know the
> error cause (with error_is_type().
> 
> However, the new error format doesn't allow this as most errors are
> class GenericError. So, we'll have to use errno to know the error cause,
> this is the case of inet_connect() when called by
> tcp_start_outgoing_migration().

I'm thinking in doing this differently. Instead of returning errno, we
could have:

 error_sete(Error **err, ErrorClass err_class, int err_no,
            const char *fmt, ...);

Then we store err_no in Error, and also add error_get_errno().

Comments?



reply via email to

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