qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	aliguori@us.ibm.com, Laszlo Ersek <lersek@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure
Date: Wed, 20 Mar 2013 14:37:59 +0100	[thread overview]
Message-ID: <20130320133758.GI3074@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <20130320085712.4983f384@doriath>

Am 20.03.2013 um 13:57 hat Luiz Capitulino geschrieben:
> On Wed, 20 Mar 2013 09:39:34 +0100
> Kevin Wolf <kwolf@redhat.com> wrote:
> 
> > Am 19.03.2013 um 21:34 hat Luiz Capitulino geschrieben:
> > > inet_connect_addr() has two users: inet_connect_opts() and wait_for_connect(),
> > > with this patch both of them are now ignoring errors from inet_connect_addr().
> > > 
> > > Suggested solution: refactor inet_connect_addr() to return an errno value.
> > > Callers use error_set() when they want to report an error upward.
> > 
> > Doesn't change the problem that you need to know when to set a return
> > value != 0. So it doesn't help, but you'd lose some error information.
> 
> My real point is that it's easier to check against errno to find out
> the error cause (compared to using Error for that).

You mean if the caller has to distinguish between different error codes?
I think I would agree that avoiding Error can be a good way then if it
doesn't lose error information. If we would lose information, using
error classes other than generic would be acceptable, right?

In the specific case, I don't think the callers make any difference and
all errors are just errors, so this is mostly about the theory.

Kevin

  reply	other threads:[~2013-03-20 13:38 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06 10:48 [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure Kevin Wolf
2013-03-06 11:04 ` Paolo Bonzini
2013-03-06 11:11   ` Kevin Wolf
2013-03-06 14:46     ` Laszlo Ersek
2013-03-06 15:04       ` Paolo Bonzini
2013-03-06 15:19         ` Kevin Wolf
2013-03-06 15:38           ` Laszlo Ersek
2013-03-06 15:47             ` Kevin Wolf
2013-03-06 16:04               ` Laszlo Ersek
2013-03-06 15:59           ` Markus Armbruster
2013-03-06 16:43             ` Paolo Bonzini
2013-03-14 14:57             ` [Qemu-devel] [RFC PATCH] qemu-socket: Use local error variable Kevin Wolf
2013-03-14 15:52               ` Laszlo Ersek
2013-03-15  8:37                 ` Kevin Wolf
2013-03-15 16:55                   ` Laszlo Ersek
2013-03-15 17:55                     ` Kevin Wolf
2013-03-15 18:39                       ` Laszlo Ersek
2013-03-19 20:34       ` [Qemu-devel] [PATCH] qemu-sockets: Fix assertion failure Luiz Capitulino
2013-03-20  8:39         ` Kevin Wolf
2013-03-20 12:57           ` Luiz Capitulino
2013-03-20 13:37             ` Kevin Wolf [this message]
2013-03-20 13:52               ` Luiz Capitulino
2013-03-06 15:05     ` Markus Armbruster
2013-03-06 15:05 ` [Qemu-devel] Error ** parameter conventions (was: [PATCH] qemu-sockets: Fix assertion failure) Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130320133758.GI3074@dhcp-200-207.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=lcapitulino@redhat.com \
    --cc=lersek@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).