diff options
Diffstat (limited to 'monitor')
-rw-r--r-- | monitor/misc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/monitor/misc.c b/monitor/misc.c index ebd49e13b6..6c5bb82d3b 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -418,8 +418,7 @@ static void hmp_logfile(Monitor *mon, const QDict *qdict) { Error *err = NULL; - qemu_set_log_filename(qdict_get_str(qdict, "filename"), &err); - if (err) { + if (!qemu_set_log_filename(qdict_get_str(qdict, "filename"), &err)) { error_report_err(err); } } @@ -428,6 +427,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 +438,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) |