From: Sven Schnelle <svens@linux.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Tzvetomir Stoyanov <tz.stoyanov@gmail.com>, linux-s390@vger.kernel.org
Subject: [PATCH] trace-cmd: fix writing of uncompressed size
Date: Mon, 11 Jul 2022 09:44:18 +0200 [thread overview]
Message-ID: <20220711074418.858843-1-svens@linux.ibm.com> (raw)
Pass &size instead of &handle->pointer. Interestingly this doesn't hurt
on x86, but makes trace-cmd fail on s390.
Fixes: 3f8447b1 ("trace-cmd library: Add support for compression algorithms")
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
---
lib/trace-cmd/trace-compress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/trace-cmd/trace-compress.c b/lib/trace-cmd/trace-compress.c
index a63295e..ad9b7fc 100644
--- a/lib/trace-cmd/trace-compress.c
+++ b/lib/trace-cmd/trace-compress.c
@@ -331,7 +331,7 @@ int tracecmd_compress_block(struct tracecmd_compression *handle)
goto out;
/* Write uncompressed data size */
- endian4 = tep_read_number(handle->tep, &handle->pointer, 4);
+ endian4 = tep_read_number(handle->tep, &size, 4);
ret = do_write(handle, &endian4, 4);
if (ret != 4) {
ret = -1;
--
2.36.1
next reply other threads:[~2022-07-11 7:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 7:44 Sven Schnelle [this message]
2022-07-11 8:55 ` [PATCH] trace-cmd: fix writing of uncompressed size Tzvetomir Stoyanov
2022-07-11 9:06 ` Sven Schnelle
2022-07-11 9:14 ` Sven Schnelle
2022-07-11 9:25 ` Tzvetomir Stoyanov
2022-07-11 9:34 ` Sven Schnelle
-- strict thread matches above, loose matches on Subject: below --
2022-07-11 18:21 [PATCH] trace-cmd: Fix " Steven Rostedt
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=20220711074418.858843-1-svens@linux.ibm.com \
--to=svens@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tz.stoyanov@gmail.com \
/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).