Message ID | 20220801233540.368009-1-edliaw@google.com |
---|---|
State | Accepted |
Headers | show |
Series | [v1] syscalls/pread02_64: format string for 64-bit offset | expand |
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
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)
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(-)