All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH v1] syscalls/pread02_64: format string for 64-bit offset
@ 2022-08-01 23:35 Edward Liaw via ltp
  2022-08-03  9:47 ` Petr Vorel
  0 siblings, 1 reply; 2+ messages in thread
From: Edward Liaw via ltp @ 2022-08-01 23:35 UTC (permalink / raw
  To: ltp; +Cc: kernel-team

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH v1] syscalls/pread02_64: format string for 64-bit offset
  2022-08-01 23:35 [LTP] [PATCH v1] syscalls/pread02_64: format string for 64-bit offset Edward Liaw via ltp
@ 2022-08-03  9:47 ` Petr Vorel
  0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2022-08-03  9:47 UTC (permalink / raw
  To: Edward Liaw; +Cc: kernel-team, ltp

Hi Edward,

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

Thanks, merged!

Kind regards,
Petr

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-03  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-01 23:35 [LTP] [PATCH v1] syscalls/pread02_64: format string for 64-bit offset Edward Liaw via ltp
2022-08-03  9:47 ` Petr Vorel

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.