All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, peter.crosthwaite@xilinx.com, hutao@cn.fujitsu.com
Subject: Re: [Qemu-devel] [PATCH 1/4] error: New error_fatal
Date: Fri, 11 Sep 2015 09:13:04 -0600	[thread overview]
Message-ID: <55F2EF80.4010704@redhat.com> (raw)
In-Reply-To: <1441983105-26376-2-git-send-email-armbru@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1231 bytes --]

On 09/11/2015 08:51 AM, Markus Armbruster wrote:
> Similar to error_abort, but doesn't report where the error was
> created, and terminates the process with exit(1) rather than abort().
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  include/qapi/error.h | 11 +++++++++++
>  util/error.c         | 34 +++++++++++++++++++++-------------
>  2 files changed, 32 insertions(+), 13 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/include/qapi/error.h b/include/qapi/error.h
> index d7878c3..c69dddb 100644
> --- a/include/qapi/error.h
> +++ b/include/qapi/error.h
> @@ -50,6 +50,9 @@
>   * Call a function aborting on errors:
>   *     foo(arg, &error_abort);
>   *
> + * Call a function treating errors as fatal:
> + *     foo(arg, &error_fatal);
> + *

Might be worth a bit more explanatory text: error_abort is for
diagnosing programmer errors (the situation cannot occur unless someone
introduced a bug), while error_fatal is for gracefully diagnosing user
errors at startup (the VM can't be booted because the user asked for the
impossible).

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2015-09-11 15:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11 14:51 [Qemu-devel] [PATCH 0/4] Don't abort when we can't allocate guest memory (again) Markus Armbruster
2015-09-11 14:51 ` [Qemu-devel] [PATCH 1/4] error: New error_fatal Markus Armbruster
2015-09-11 15:13   ` Eric Blake [this message]
2015-09-11 14:51 ` [Qemu-devel] [PATCH 2/4] Fix bad error handling after memory_region_init_ram() Markus Armbruster
2015-09-14  5:13   ` Peter Crosthwaite
2015-09-14  7:57     ` Markus Armbruster
2015-09-11 14:51 ` [Qemu-devel] [PATCH 3/4] loader: Fix memory_region_init_resizeable_ram() error handling Markus Armbruster
2015-09-11 14:51 ` [Qemu-devel] [PATCH 4/4] memory: Fix bad error handling in memory_region_init_ram_ptr() Markus Armbruster
2015-09-11 15:10 ` [Qemu-devel] [PATCH 0/4] Don't abort when we can't allocate guest memory (again) Markus Armbruster
2015-09-14  5:14 ` Peter Crosthwaite

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=55F2EF80.4010704@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=hutao@cn.fujitsu.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.crosthwaite@xilinx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.