From 0cbfb324b54e4c5859c76dd132a7ad942c0f5e77 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Mon, 19 Feb 2001 13:35:53 +0000 Subject: [PATCH] Add sys_sysmips decoding --- ChangeLog | 5 +++++ linux/mips/syscallent.h | 2 +- linux/syscall.h | 4 ++++ system.c | 41 ++++++++++++++++++++++++++++++++++++++++- 4 files changed, 50 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c27e8cc1..2a578542 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-02-19 Wichert Akkerman + + * linux/mips/syscallent.h: use new sys_sysmips + * system.c: add sys_sysmips decoding + 2001-02-16 Wichert Akkerman * CREDITS: add Arkadiusz Miskiewicz who diff --git a/linux/mips/syscallent.h b/linux/mips/syscallent.h index 48da9e17..7c8bc45a 100644 --- a/linux/mips/syscallent.h +++ b/linux/mips/syscallent.h @@ -4147,7 +4147,7 @@ { 5, 0, sys_writev, "writev" }, /* 4146 */ { 3, 0, printargs, "cacheflush" }, /* 4147 */ { 3, 0, printargs, "cachectl" }, /* 4148 */ - { 4, 0, printargs, "sysmips" }, /* 4149 */ + { 4, 0, sys_sysmips, "sysmips" }, /* 4149 */ { 0, 0, sys_setup, "setup" }, /* 4150 */ { 0, 0, sys_getsid, "getsid" }, /* 4151 */ { 5, 0, sys_fdatasync, "fdatasync" }, /* 4152 */ diff --git a/linux/syscall.h b/linux/syscall.h index e1f96d8e..6ad5fe99 100644 --- a/linux/syscall.h +++ b/linux/syscall.h @@ -175,6 +175,10 @@ int osf_statfs(), osf_fstatfs(); int sys_getpmsg(), sys_putpmsg(); /* STREAMS stuff */ #endif +#ifdef MIPS +int sys_sysmips() +#endif + int sys_setpgrp(), sys_gethostname(), sys_getdtablesize(), sys_utimes(); int sys_capget(), sys_capset(); diff --git a/system.c b/system.c index 39930b57..89723bef 100644 --- a/system.c +++ b/system.c @@ -2000,4 +2000,43 @@ struct tcb *tcp; return 0; } -#endif +#endif /* UNIXWARE > 2 */ + +#ifdef MIPS + +static struct xlat_sysmips[] = { + { SETNAME, "SETNAME" }, + { FLUSH_CACHE, "FLUSH_CACHE" }, + { MIPS_FIXADE, "MIPS_FIXADE" }, + { MIPS_RDNVRAM, "MIPS_RDNVRAM" }, + { MIPS_ATOMIC_SET, "MIPS_ATOMIC_SET" }, + { 0, NULL } +}; + +int sys_sysmips(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + printxval(xlat_sysmips, tcp->u_arg[0], "???"); + tprintf(", "); + if (!verbose(tcp)) { + tprintf("%d, %d, %d", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]); + } else if (tcp->u_arg[0]==SETNAME) { + char nodename[__NEW_UTS_LEN_1]; + if (umovestr(tcp, tcp->u_arg[1], (__NEW_UTS_LEN_1), nodename) < 0) + tprintf(", %#lx", tcp->u_arg[1]); + else + tprintf(", \"%s\"", nodename); + } else if (tcp->u_arg[0]==MIPS_ATOMIC_SET) { + tprintf(", %#lx, 0x%x", tcp->u_arg[1], tcp->u_arg[2]); + } else if (tcp->u_arg[0]==MIPS_FIXADE) { + tprintf(", 0x%x", tcp->u_arg[1]); + } else { + tprintf("%d, %d, %d", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]); + } + } + + return 0; +} + +#endif /* MIPS */ -- 2.50.1