#include "defs.h"
-void
-tprint_msgbuf(struct tcb *tcp, const long addr, const unsigned long count)
+#include <sys/msg.h>
+
+#include DEF_MPERS_TYPE(msgbuf_t)
+typedef struct msgbuf msgbuf_t;
+#include MPERS_DEFS
+
+MPERS_PRINTER_DECL(void, tprint_msgbuf, struct tcb *const tcp,
+ const kernel_ulong_t addr, const kernel_ulong_t count)
{
- long mtype;
+ msgbuf_t msg;
- if (!umove_or_printaddr(tcp, addr, &mtype)) {
- tprintf("{%lu, ", mtype);
- printstr(tcp, addr + sizeof(mtype), count);
+ if (!umove_or_printaddr(tcp, addr, &msg)) {
+ tprintf("{%" PRI_kld ", ", (kernel_long_t) msg.mtype);
+ printstrn(tcp, addr + sizeof(msg.mtype), count);
tprints("}");
}
- tprintf(", %lu, ", count);
+ tprintf(", %" PRI_klu ", ", count);
}