blob: d7d5455e1dcb11bdb489b5a2ee33f674d0ce5410 [file] [log] [blame]
Dmitry V. Levin600e33c2014-12-03 20:08:44 +00001#include "defs.h"
2
3#ifdef MIPS
4
5#ifdef HAVE_LINUX_UTSNAME_H
6# include <linux/utsname.h>
7#endif
8#ifdef HAVE_ASM_SYSMIPS_H
9# include <asm/sysmips.h>
10#endif
11
12#ifndef __NEW_UTS_LEN
13# define __NEW_UTS_LEN 64
14#endif
15
16#include "xlat/sysmips_operations.h"
17
Dmitry V. Levina0bd3742015-04-07 01:36:50 +000018SYS_FUNC(sysmips)
Dmitry V. Levin600e33c2014-12-03 20:08:44 +000019{
20 if (entering(tcp)) {
21 printxval(sysmips_operations, tcp->u_arg[0], "???");
22 if (!verbose(tcp)) {
23 tprintf("%ld, %ld, %ld", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
24 } else if (tcp->u_arg[0] == SETNAME) {
25 char nodename[__NEW_UTS_LEN + 1];
Dmitry V. Levin8192cec2015-01-24 22:33:55 +000026 tprints(", ");
27 if (umovestr(tcp, tcp->u_arg[1], (__NEW_UTS_LEN + 1),
28 nodename) < 0) {
29 tprintf("%#lx", tcp->u_arg[1]);
30 } else {
31 print_quoted_string(nodename, __NEW_UTS_LEN + 1,
32 QUOTE_0_TERMINATED);
33 }
Dmitry V. Levin600e33c2014-12-03 20:08:44 +000034 } else if (tcp->u_arg[0] == MIPS_ATOMIC_SET) {
35 tprintf(", %#lx, 0x%lx", tcp->u_arg[1], tcp->u_arg[2]);
36 } else if (tcp->u_arg[0] == MIPS_FIXADE) {
37 tprintf(", 0x%lx", tcp->u_arg[1]);
38 } else {
39 tprintf("%ld, %ld, %ld", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
40 }
41 }
42
43 return 0;
44}
45
46#endif /* MIPS */