diff options
Diffstat (limited to 'tools/lib/traceevent/event-parse.c')
-rw-r--r-- | tools/lib/traceevent/event-parse.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c index bb22238debfe..6f842af4550b 100644 --- a/tools/lib/traceevent/event-parse.c +++ b/tools/lib/traceevent/event-parse.c | |||
@@ -4367,10 +4367,20 @@ static struct tep_print_arg *make_bprint_args(char *fmt, void *data, int size, s | |||
4367 | switch (*ptr) { | 4367 | switch (*ptr) { |
4368 | case 's': | 4368 | case 's': |
4369 | case 'S': | 4369 | case 'S': |
4370 | case 'f': | ||
4371 | case 'F': | ||
4372 | case 'x': | 4370 | case 'x': |
4373 | break; | 4371 | break; |
4372 | case 'f': | ||
4373 | case 'F': | ||
4374 | /* | ||
4375 | * Pre-5.5 kernels use %pf and | ||
4376 | * %pF for printing symbols | ||
4377 | * while kernels since 5.5 use | ||
4378 | * %pfw for fwnodes. So check | ||
4379 | * %p[fF] isn't followed by 'w'. | ||
4380 | */ | ||
4381 | if (ptr[1] != 'w') | ||
4382 | break; | ||
4383 | /* fall through */ | ||
4374 | default: | 4384 | default: |
4375 | /* | 4385 | /* |
4376 | * Older kernels do not process | 4386 | * Older kernels do not process |
@@ -4487,12 +4497,12 @@ get_bprint_format(void *data, int size __maybe_unused, | |||
4487 | 4497 | ||
4488 | printk = find_printk(tep, addr); | 4498 | printk = find_printk(tep, addr); |
4489 | if (!printk) { | 4499 | if (!printk) { |
4490 | if (asprintf(&format, "%%pf: (NO FORMAT FOUND at %llx)\n", addr) < 0) | 4500 | if (asprintf(&format, "%%ps: (NO FORMAT FOUND at %llx)\n", addr) < 0) |
4491 | return NULL; | 4501 | return NULL; |
4492 | return format; | 4502 | return format; |
4493 | } | 4503 | } |
4494 | 4504 | ||
4495 | if (asprintf(&format, "%s: %s", "%pf", printk->printk) < 0) | 4505 | if (asprintf(&format, "%s: %s", "%ps", printk->printk) < 0) |
4496 | return NULL; | 4506 | return NULL; |
4497 | 4507 | ||
4498 | return format; | 4508 | return format; |