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 <arm...@redhat.com> > --- > include/qapi/error.h | 11 +++++++++++ > util/error.c | 34 +++++++++++++++++++++------------- > 2 files changed, 32 insertions(+), 13 deletions(-)
Reviewed-by: Eric Blake <ebl...@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
signature.asc
Description: OpenPGP digital signature