[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] error: New error_fatal
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] error: New error_fatal |
Date: |
Fri, 11 Sep 2015 09:13:04 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
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 <address@hidden>
> ---
> include/qapi/error.h | 11 +++++++++++
> util/error.c | 34 +++++++++++++++++++++-------------
> 2 files changed, 32 insertions(+), 13 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
>
> 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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 0/4] Don't abort when we can't allocate guest memory (again), Markus Armbruster, 2015/09/11
- [Qemu-devel] [PATCH 3/4] loader: Fix memory_region_init_resizeable_ram() error handling, Markus Armbruster, 2015/09/11
- [Qemu-devel] [PATCH 4/4] memory: Fix bad error handling in memory_region_init_ram_ptr(), Markus Armbruster, 2015/09/11
- [Qemu-devel] [PATCH 1/4] error: New error_fatal, Markus Armbruster, 2015/09/11
- Re: [Qemu-devel] [PATCH 1/4] error: New error_fatal,
Eric Blake <=
- [Qemu-devel] [PATCH 2/4] Fix bad error handling after memory_region_init_ram(), Markus Armbruster, 2015/09/11
- Re: [Qemu-devel] [PATCH 0/4] Don't abort when we can't allocate guest memory (again), Markus Armbruster, 2015/09/11
- Re: [Qemu-devel] [PATCH 0/4] Don't abort when we can't allocate guest memory (again), Peter Crosthwaite, 2015/09/14