From: Markus Armbruster <armbru@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: Fam Zheng <famz@redhat.com>,
peter.maydell@linaro.org, pbonzini@redhat.com,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] error-report: provide error_report_exit()
Date: Tue, 16 Aug 2016 16:45:13 +0200 [thread overview]
Message-ID: <87zioc22o6.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20160816140018.GG9866@pxdev.xzpeter.org> (Peter Xu's message of "Tue, 16 Aug 2016 22:00:18 +0800")
Peter Xu <peterx@redhat.com> writes:
> On Tue, Aug 16, 2016 at 08:19:08PM +0800, Fam Zheng wrote:
>> On Tue, 08/16 20:17, Peter Xu wrote:
>> > > Do we really need error_report_exit when we already have error_fatal?
>> >
>> > error_fatal is the name of a global var, not the function.
>>
>> I mean most error_report_exit(...) calls can be converted to
>> error_setg(&error_fatal, ...).
>
> Right. But it's just another way to implement error_report_fatal(). We
> may still need error_report_fatal() since it's cleaner and shorter
> than error_setg(&error_fatal, ...).
Fam's point that
error_report_fatal(...);
is just another way to write
error_setg(&error_fatal, ...)
is valid. Your point that the former is shorter and simpler is also
valid. In fact, error.h advises:
* Please don't error_setg(&error_fatal, ...), use error_report() and
* exit(), because that's more obvious.
* Likewise, don't error_setg(&error_abort, ...), use assert().
Could you convert the existing error_setg(&error_fatal, ...) to
error_report_fatal(...)?
Regarding error_report_abort(): in my opinion, printing pretty messages
right before abort() is largely a waste of time. But if people insist
on doing it, then the error subsystem may have to support it. Would you
be willing to track down such usage, so we can make an informed
decision?
next prev parent reply other threads:[~2016-08-16 14:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 7:37 [Qemu-devel] [PATCH 0/2] error-report: introduce error_report_exit() Peter Xu
2016-08-11 7:37 ` [Qemu-devel] [PATCH 1/2] error-report: provide error_report_exit() Peter Xu
2016-08-16 11:05 ` Markus Armbruster
2016-08-16 11:53 ` Fam Zheng
2016-08-16 12:17 ` Peter Xu
2016-08-16 12:19 ` Fam Zheng
2016-08-16 14:00 ` Peter Xu
2016-08-16 14:01 ` Fam Zheng
2016-08-16 14:45 ` Markus Armbruster [this message]
2016-08-17 6:47 ` Peter Xu
2016-08-17 7:33 ` Markus Armbruster
2016-08-17 7:38 ` Peter Xu
2016-08-17 8:17 ` Peter Xu
2016-08-17 9:26 ` Markus Armbruster
2016-08-17 9:32 ` Peter Xu
2016-08-11 7:37 ` [Qemu-devel] [PATCH 2/2] error-report: leveraging error_report_exit() Peter Xu
2016-08-11 7:55 ` [Qemu-devel] [PATCH v2] " Peter Xu
2016-08-11 8:01 ` no-reply
2016-08-11 8:47 ` Peter Xu
2016-08-11 8:45 ` Fam Zheng
2016-08-11 8:58 ` Peter Xu
2016-08-11 7:50 ` [Qemu-devel] [PATCH 0/2] error-report: introduce error_report_exit() no-reply
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=87zioc22o6.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=famz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@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 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.