#include "xlat/ipc_msg_flags.h"
#include "xlat/resource_flags.h"
-extern void tprint_msgbuf(struct tcb *tcp, const long addr, const unsigned long count);
-
SYS_FUNC(msgget)
{
if (tcp->u_arg[0])
tprint_msgsnd(struct tcb *tcp, const long addr, const unsigned long count,
const unsigned long flags)
{
- tprint_msgbuf(tcp, addr, count);
+ MPERS_PRINTER_NAME(tprint_msgbuf)(tcp, addr, count);
printflags(ipc_msg_flags, flags, "MSG_???");
}
tprint_msgrcv(struct tcb *tcp, const long addr, const unsigned long count,
const long msgtyp)
{
- tprint_msgbuf(tcp, addr, count);
+ MPERS_PRINTER_NAME(tprint_msgbuf)(tcp, addr, count);
tprintf("%ld, ", msgtyp);
}
#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 *tcp, const long addr, const unsigned long 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("{%lu, ", (long) msg.mtype);
+ printstr(tcp, addr + sizeof(msg.mtype), count);
tprints("}");
}
tprintf(", %lu, ", count);