syscalls/pread02_64: format string for 64-bit offset
PATCH 1/1 syscalls/pread02_64: format string for 64-bit offset
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 <[email protected]>
--- testcases/kernel/syscalls/pread/pread02.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/pread/pread02.c +1 -1
@@ -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 )
Signature · 5 lines
2.37.1.455.g008518b4e5-goog -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Edward,
Quoted 2 lines
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
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp