[LTP] [PATCH v1] syscalls/pread02_64: format string for 64-bit offset
Edward Liaw
edliaw@google.com
Tue Aug 2 01:35:40 CEST 2022
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
More information about the ltp
mailing list