diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-10-13 19:14:29 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-10-13 19:14:29 +0000 |
commit | f871d6893a7bf8c14db162f6e75a5f8157e4c2bb (patch) | |
tree | 6b68bc6aed69b8725f4454ec83c577056f206869 /monitor.c | |
parent | 2abf314dddcfc1792a981ef6ecda343384b2a1a2 (diff) | |
download | qemu-f871d6893a7bf8c14db162f6e75a5f8157e4c2bb.zip qemu-f871d6893a7bf8c14db162f6e75a5f8157e4c2bb.tar.gz qemu-f871d6893a7bf8c14db162f6e75a5f8157e4c2bb.tar.bz2 |
trace: print a warning if user tries to enable an unknown trace event
There was no warning if a bad trace event name was given to
'trace-event' command, thus the user could think that the command
was successful even if this was not the case.
Print a warning if the user tries to enable a trace event which is not
known.
Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -549,7 +549,11 @@ static void do_change_trace_event_state(Monitor *mon, const QDict *qdict) { const char *tp_name = qdict_get_str(qdict, "name"); bool new_state = qdict_get_bool(qdict, "option"); - st_change_trace_event_state(tp_name, new_state); + int ret = st_change_trace_event_state(tp_name, new_state); + + if (!ret) { + monitor_printf(mon, "unknown event name \"%s\"\n", tp_name); + } } static void do_trace_file(Monitor *mon, const QDict *qdict) |