]> granicus.if.org Git - strace/blobdiff - print_msgbuf.c
travis: add build environment information to the travis log
[strace] / print_msgbuf.c
index 68d8741be045d5828dce7e9c14e30ea9f50d988a..0a3147ca104ead7964e41aceb76a7a3150618543 100644 (file)
@@ -5,6 +5,7 @@
  * Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
  * Copyright (c) 2003-2006 Roland McGrath <roland@redhat.com>
  * Copyright (c) 2006-2015 Dmitry V. Levin <ldv@altlinux.org>
+ * Copyright (c) 2015-2017 The strace developers.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
 typedef struct msgbuf msgbuf_t;
 #include MPERS_DEFS
 
-MPERS_PRINTER_DECL(void, tprint_msgbuf,
-                  struct tcb *tcp, const long addr, const unsigned long count)
+MPERS_PRINTER_DECL(void, tprint_msgbuf, struct tcb *const tcp,
+                  const kernel_ulong_t addr, const kernel_ulong_t count)
 {
        msgbuf_t msg;
 
        if (!umove_or_printaddr(tcp, addr, &msg)) {
-               tprintf("{%lu, ", (long) msg.mtype);
-               printstr(tcp, addr + sizeof(msg.mtype), count);
+               tprintf("{%" PRI_kld ", ", (kernel_long_t) msg.mtype);
+               printstrn(tcp, addr + sizeof(msg.mtype), count);
                tprints("}");
        }
-       tprintf(", %lu, ", count);
+       tprintf(", %" PRI_klu ", ", count);
 }