All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Cc: Chuck Lever III <chuck.lever@oracle.com>
Subject: [PATCH] libtraceevent: Fix %zd and %Zd processing
Date: Wed, 23 Feb 2022 16:03:18 -0500	[thread overview]
Message-ID: <20220223160318.09b7c4eb@gandalf.local.home> (raw)

From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

The 'z' option in printf is to handle the long case. To print as 32 bit on
32 bit architectures and 64 bit on 64 bit architectures. But currently it
is simply ignored in the printf formatting.

Reported-by: Chuck Lever III <chuck.lever@oracle.com>
Fixes: 6582b0aea1cc ("tools/events: Add files to create libtraceevent.a")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 src/event-parse.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/event-parse.c b/src/event-parse.c
index de28b3be9955..124166909589 100644
--- a/src/event-parse.c
+++ b/src/event-parse.c
@@ -5713,9 +5713,11 @@ static int parse_arg_format(struct tep_print_parse **parse,
 		case 'L':
 			ls = 2;
 			break;
-		case '.':
 		case 'z':
 		case 'Z':
+			ls = 1;
+			break;
+		case '.':
 		case '0' ... '9':
 		case '-':
 			break;
-- 
2.34.1


                 reply	other threads:[~2022-02-23 21:03 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=20220223160318.09b7c4eb@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=chuck.lever@oracle.com \
    --cc=linux-trace-devel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.