mips: quote sysmips nodename
* sysmips.c (sys_sysmips): Print nodename using print_quoted_string.
This commit is contained in:
parent
0a87058640
commit
8192cece19
12
sysmips.c
12
sysmips.c
@ -23,10 +23,14 @@ int sys_sysmips(struct tcb *tcp)
|
||||
tprintf("%ld, %ld, %ld", 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\"", (int)(__NEW_UTS_LEN + 1), nodename);
|
||||
tprints(", ");
|
||||
if (umovestr(tcp, tcp->u_arg[1], (__NEW_UTS_LEN + 1),
|
||||
nodename) < 0) {
|
||||
tprintf("%#lx", tcp->u_arg[1]);
|
||||
} else {
|
||||
print_quoted_string(nodename, __NEW_UTS_LEN + 1,
|
||||
QUOTE_0_TERMINATED);
|
||||
}
|
||||
} else if (tcp->u_arg[0] == MIPS_ATOMIC_SET) {
|
||||
tprintf(", %#lx, 0x%lx", tcp->u_arg[1], tcp->u_arg[2]);
|
||||
} else if (tcp->u_arg[0] == MIPS_FIXADE) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user