[PATCH] trace-cmd libtraceevent: Fix bprint '#' parsing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix handling of '#' in bprint format specifiers.

For example, with this:

 trace_printk("jiffies %lu pending %#x\n", jiffies, pending);

Before:

  bprint: __do_softirq: jiffies 4294919108 pending x
  ...
  bprint: [FAILED TO PARSE] ip=... fmt=... buf=ARRAY[]

After:

  bprint: __do_softirq: jiffies 4294919108 pending 0x4
  ...
  bprint: __do_softirq: jiffies 4294919109 pending 0x4

Signed-off-by: Vincent Whitchurch <vincent.whitchurch@xxxxxxxx>
---
 lib/traceevent/event-parse.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/traceevent/event-parse.c b/lib/traceevent/event-parse.c
index 06fa3dd..a62d2f7 100644
--- a/lib/traceevent/event-parse.c
+++ b/lib/traceevent/event-parse.c
@@ -4456,6 +4456,8 @@ static struct tep_print_arg *make_bprint_args(char *fmt, void *data, int size, s
 				goto process_again;
 			case '.':
 				goto process_again;
+			case '#':
+				goto process_again;
 			case 'z':
 			case 'Z':
 				ls = 1;
-- 
2.28.0




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux