#include DEF_MPERS_TYPE(kernel_dirent)
-#include "kernel_types.h"
-
#include MPERS_DEFS
#define D_NAME_LEN_MAX 256
static void
-print_old_dirent(struct tcb *tcp, long addr)
+print_old_dirent(struct tcb *const tcp, const kernel_ulong_t addr)
{
kernel_dirent d;
return;
tprintf("{d_ino=%llu, d_off=%llu, d_reclen=%u, d_name=",
- (unsigned long long) d.d_ino,
- (unsigned long long) d.d_off, d.d_reclen);
+ zero_extend_signed_to_ull(d.d_ino),
+ zero_extend_signed_to_ull(d.d_off), d.d_reclen);
if (d.d_reclen > D_NAME_LEN_MAX)
d.d_reclen = D_NAME_LEN_MAX;
printpathn(tcp, addr + offsetof(kernel_dirent, d_name), d.d_reclen);
print_old_dirent(tcp, tcp->u_arg[1]);
/* Not much point in printing this out, it is always 1. */
if (tcp->u_arg[2] != 1)
- tprintf(", %lu", tcp->u_arg[2]);
+ tprintf(", %" PRI_klu, tcp->u_arg[2]);
}
return 0;
}
tprintf("%s{d_ino=%llu, d_off=%llu, d_reclen=%u"
", d_name=", i ? ", " : "",
- (unsigned long long) d->d_ino,
- (unsigned long long) d->d_off, d->d_reclen);
+ zero_extend_signed_to_ull(d->d_ino),
+ zero_extend_signed_to_ull(d->d_off),
+ d->d_reclen);
if (print_quoted_string(d->d_name, d_name_len,
QUOTE_0_TERMINATED) > 0) {