diff options
author | Markus Armbruster <armbru@redhat.com> | 2016-06-15 19:27:15 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2016-06-20 16:38:31 +0200 |
commit | bd6fee9f1263dc5ba487c7ac57d33a727af63c00 (patch) | |
tree | d4bfe62cf9142dd4868e66fd04399198da54966a /vl.c | |
parent | 2ec62faea274aabb2feaad2b8f85961161b5e1e4 (diff) | |
download | qemu-bd6fee9f1263dc5ba487c7ac57d33a727af63c00.zip qemu-bd6fee9f1263dc5ba487c7ac57d33a727af63c00.tar.gz qemu-bd6fee9f1263dc5ba487c7ac57d33a727af63c00.tar.bz2 |
log: Fix qemu_set_dfilter_ranges() error reporting
g_error() is not an acceptable way to report errors to the user:
$ qemu-system-x86_64 -dfilter 1000+0
** (process:17187): ERROR **: Failed to parse range in: 1000+0
Trace/breakpoint trap (core dumped)
g_assert() isn't, either:
$ qemu-system-x86_64 -dfilter 1000x+64
**
ERROR:/work/armbru/qemu/util/log.c:180:qemu_set_dfilter_ranges: assertion failed: (e == range_op)
Aborted (core dumped)
Convert qemu_set_dfilter_ranges() to Error. Rework its deeply nested
control flow. Touch up the error messages. Call it with
&error_fatal.
This also permits testing without a subprocess, so do that.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1466011636-6112-3-git-send-email-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3339,7 +3339,7 @@ int main(int argc, char **argv, char **envp) log_file = optarg; break; case QEMU_OPTION_DFILTER: - qemu_set_dfilter_ranges(optarg); + qemu_set_dfilter_ranges(optarg, &error_fatal); break; case QEMU_OPTION_s: add_device_config(DEV_GDB, "tcp::" DEFAULT_GDBSTUB_PORT); |