mirror of
https://github.com/qemu/qemu.git
synced 2025-08-08 08:05:17 +00:00
error: Don't use error_report() for assertion msgs.
Use fprintf(stderr instead. This removes dependency of libqemuutil.a
on the monitor.
We can further justify this change, in that this code path should only
trigger under a fatal error condition. fprintf-stderr is probably the
appropriate medium as under a fatal error conidition the monitor itself
may be down and out for the count. So assertion failure messages should
go lowest common denominator - straight to stderr.
Fixes the build as reported by Kevin Wolf. Issue debugged and change
suggested by Luiz Capitulino. Issue introduced by
5d24ee70bc
.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
This commit is contained in:
parent
133fe77437
commit
d32934c84c
@ -44,7 +44,7 @@ void error_set(Error **errp, ErrorClass err_class, const char *fmt, ...)
|
|||||||
err->err_class = err_class;
|
err->err_class = err_class;
|
||||||
|
|
||||||
if (errp == &error_abort) {
|
if (errp == &error_abort) {
|
||||||
error_report("%s", error_get_pretty(err));
|
fprintf(stderr, "%s\n", error_get_pretty(err));
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ void error_set_errno(Error **errp, int os_errno, ErrorClass err_class,
|
|||||||
err->err_class = err_class;
|
err->err_class = err_class;
|
||||||
|
|
||||||
if (errp == &error_abort) {
|
if (errp == &error_abort) {
|
||||||
error_report("%s", error_get_pretty(err));
|
fprintf(stderr, "%s\n", error_get_pretty(err));
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ void error_set_win32(Error **errp, int win32_err, ErrorClass err_class,
|
|||||||
err->err_class = err_class;
|
err->err_class = err_class;
|
||||||
|
|
||||||
if (errp == &error_abort) {
|
if (errp == &error_abort) {
|
||||||
error_report("%s", error_get_pretty(err));
|
fprintf(stderr, "%s\n", error_get_pretty(err));
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ void error_free(Error *err)
|
|||||||
void error_propagate(Error **dst_err, Error *local_err)
|
void error_propagate(Error **dst_err, Error *local_err)
|
||||||
{
|
{
|
||||||
if (local_err && dst_err == &error_abort) {
|
if (local_err && dst_err == &error_abort) {
|
||||||
error_report("%s", error_get_pretty(local_err));
|
fprintf(stderr, "%s\n", error_get_pretty(local_err));
|
||||||
abort();
|
abort();
|
||||||
} else if (dst_err && !*dst_err) {
|
} else if (dst_err && !*dst_err) {
|
||||||
*dst_err = local_err;
|
*dst_err = local_err;
|
||||||
|
Loading…
Reference in New Issue
Block a user