From: Ruben Devos <devosruben6@gmail.com>
To: linux-trace-devel@vger.kernel.org
Cc: rostedt@goodmis.org, Ruben Devos <devosruben6@gmail.com>
Subject: [PATCH] libtraceevent: Add support for \t char in print fmt
Date: Thu, 27 Feb 2025 21:26:18 +0100 [thread overview]
Message-ID: <20250227202618.54073-1-devosruben6@gmail.com> (raw)
Events can have \t characters in their print format strings. An example
is the smb3_cmd_done event from the cifs module. It has print format
string:
"\tsid=0x%llx tid=0x%x cmd=%u mid=%llu", ...
Add \t as an accepted character in the while loop that parses the format
string. This prevents the "[FAILED TO PARSE]" message and imporperly
parsed output in `trace-cmd report`.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=219688
Signed-off-by: Ruben Devos <devosruben6@gmail.com>
---
src/event-parse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/event-parse.c b/src/event-parse.c
index f2e50b0..06dfd52 100644
--- a/src/event-parse.c
+++ b/src/event-parse.c
@@ -1307,7 +1307,7 @@ static enum tep_event_type __read_token(struct tep_handle *tep, char **tok)
/* Break out if the file is corrupted and giving non print chars */
if (ch <= 0)
break;
- } while ((ch != quote_ch && isprint(ch)) || last_ch == '\\' || ch == '\n');
+ } while ((ch != quote_ch && isprint(ch)) || last_ch == '\\' || ch == '\n' || ch == '\t');
/* remove the last quote */
i--;
--
2.48.1
reply other threads:[~2025-02-27 20:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250227202618.54073-1-devosruben6@gmail.com \
--to=devosruben6@gmail.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).