diff options
author | Richard Henderson | 2022-04-17 20:29:44 +0200 |
---|---|---|
committer | Richard Henderson | 2022-04-20 19:51:11 +0200 |
commit | c5955f4ff4689b7a04cf0a1109fa97ce885876b4 (patch) | |
tree | 27a7af47ce5ee5469d49c2736f728a6ef646e7cd /monitor | |
parent | util/log: Return bool from qemu_set_log_filename (diff) | |
download | qemu-c5955f4ff4689b7a04cf0a1109fa97ce885876b4.tar.gz qemu-c5955f4ff4689b7a04cf0a1109fa97ce885876b4.tar.xz qemu-c5955f4ff4689b7a04cf0a1109fa97ce885876b4.zip |
util/log: Pass Error pointer to qemu_set_log
Do not force exit within qemu_set_log; return bool and pass
an Error value back up the stack as per usual.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-5-richard.henderson@linaro.org>
Diffstat (limited to 'monitor')
-rw-r--r-- | monitor/misc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/monitor/misc.c b/monitor/misc.c index 4b68fcd346..33372b93cc 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -428,6 +428,7 @@ static void hmp_log(Monitor *mon, const QDict *qdict) { int mask; const char *items = qdict_get_str(qdict, "items"); + Error *err = NULL; if (!strcmp(items, "none")) { mask = 0; @@ -438,7 +439,10 @@ static void hmp_log(Monitor *mon, const QDict *qdict) return; } } - qemu_set_log(mask); + + if (!qemu_set_log(mask, &err)) { + error_report_err(err); + } } static void hmp_singlestep(Monitor *mon, const QDict *qdict) |