All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Liaw via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Cc: kernel-team@android.com
Subject: [LTP] [PATCH v1] syscalls/pread02_64: format string for 64-bit offset
Date: Mon,  1 Aug 2022 23:35:40 +0000	[thread overview]
Message-ID: <20220801233540.368009-1-edliaw@google.com> (raw)

When compiling as 32-bit with _FILE_OFFSET_BITS=64, the format string
needs to be specified as 64-bit long (%lld).

Signed-off-by: Edward Liaw <edliaw@google.com>
---
 testcases/kernel/syscalls/pread/pread02.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/syscalls/pread/pread02.c b/testcases/kernel/syscalls/pread/pread02.c
index fda5fd190..5fa011ef2 100644
--- a/testcases/kernel/syscalls/pread/pread02.c
+++ b/testcases/kernel/syscalls/pread/pread02.c
@@ -42,7 +42,7 @@ static void verify_pread(unsigned int n)
 	char buf[K1];
 
 	TST_EXP_FAIL2(pread(*tc->fd, &buf, tc->nb, tc->offst), tc->exp_errno,
-		"pread(%d, %zu, %ld) %s", *tc->fd, tc->nb, tc->offst, tc->desc);
+		"pread(%d, %zu, %lld) %s", *tc->fd, tc->nb, (long long)tc->offst, tc->desc);
 }
 
 static void setup(void)
-- 
2.37.1.455.g008518b4e5-goog


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

             reply	other threads:[~2022-08-01 23:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01 23:35 Edward Liaw via ltp [this message]
2022-08-03  9:47 ` [LTP] [PATCH v1] syscalls/pread02_64: format string for 64-bit offset Petr Vorel

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=20220801233540.368009-1-edliaw@google.com \
    --to=ltp@lists.linux.it \
    --cc=edliaw@google.com \
    --cc=kernel-team@android.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 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.