aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Google) <rostedt@goodmis.org>2023-06-01 08:48:23 -0400
committerSteven Rostedt (Google) <rostedt@goodmis.org>2023-06-02 04:30:44 -0400
commit0b9a34e45975edecfb8569849bfd9f5b3039f19f (patch)
treec0c746239ba8e377f4988251c3f80897aa8c74ce
parenteba4a417cf7053293443cf7d79c42b6b9a629fe6 (diff)
downloadlibtraceevent-0b9a34e45975edecfb8569849bfd9f5b3039f19f.tar.gz
libtraceevent: Handle printf '%+d" case
The print prasing does not handle '%+d' and prints ">+<d" instead. The '+' is a valid printf specifier. Make sure to handle it. Link: https://lore.kernel.org/linux-trace-devel/20230601084823.43e68c0f@rorschach.local.home Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=217339 Reported-by: Douglas RAILLARD <douglas.raillard@arm.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r--src/event-parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/event-parse.c b/src/event-parse.c
index 12c6f56..b4191eb 100644
--- a/src/event-parse.c
+++ b/src/event-parse.c
@@ -5179,10 +5179,9 @@ static struct tep_print_arg *make_bprint_args(char *fmt, void *data, int size, s
ls = 2;
goto process_again;
case '0' ... '9':
- goto process_again;
case '.':
- goto process_again;
case '#':
+ case '+':
goto process_again;
case 'z':
case 'Z':
@@ -6443,6 +6442,7 @@ static int parse_arg_format(struct tep_print_parse **parse,
case '.':
case '0' ... '9':
case '-':
+ case '+':
break;
case '*':
/* The argument is the length. */