diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2016-09-06 19:25:43 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-09-14 22:52:44 +0200 |
commit | 89d0a64f496fb4248885ebf75216c49337951540 (patch) | |
tree | 8d133c9c26cc6c8a0dc5d720e841c2c6996b8d32 /cpus.c | |
parent | 71200fb9664c2967a1cdd22b68b0da3a8b2b3eb7 (diff) | |
download | qemu-89d0a64f496fb4248885ebf75216c49337951540.zip qemu-89d0a64f496fb4248885ebf75216c49337951540.tar.gz qemu-89d0a64f496fb4248885ebf75216c49337951540.tar.bz2 |
log: fix parsing of multiple trace:PATTERN log args
If giving QEMU a log arg which asks to enable multiple
different trace event patterns such as
$QEMU -d trace:qio*,trace:qcrypto*
the parser will then invoke
trace_enable_events("qio*,trace:qcrypto*")
trace_enable_events("qcrypto*")
as when finding a 'trace:' prefix, it is not clever
enough to strip anything after the next comma. As
a result only the last 'trace:' match ever works.
Rather than trying to be more clever with parsing the
command line arg in place, simplify the code by
using g_strsplit to break it into individual strings
on ','. These resulting pieces can be directly used
without worrying about trailing data from the next
option.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Message-Id: <1473186343-16704-1-git-send-email-berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'cpus.c')
0 files changed, 0 insertions, 0 deletions