diff options
| author | Daniel P. Berrange | 2016-09-06 20:25:43 +0200 |
|---|---|---|
| committer | Paolo Bonzini | 2016-09-14 22:52:44 +0200 |
| commit | 89d0a64f496fb4248885ebf75216c49337951540 (patch) | |
| tree | 8d133c9c26cc6c8a0dc5d720e841c2c6996b8d32 /scripts/switch-timer-api | |
| parent | qemu-char: avoid segfault if user lacks of permisson of a given logfile (diff) | |
| download | qemu-89d0a64f496fb4248885ebf75216c49337951540.tar.gz qemu-89d0a64f496fb4248885ebf75216c49337951540.tar.xz qemu-89d0a64f496fb4248885ebf75216c49337951540.zip | |
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 'scripts/switch-timer-api')
0 files changed, 0 insertions, 0 deletions
