mips: quote sysmips nodename
* sysmips.c (sys_sysmips): Print nodename using print_quoted_string.
diff --git a/sysmips.c b/sysmips.c
index 521b081..6728b8a 100644
--- a/sysmips.c
+++ b/sysmips.c
@@ -23,10 +23,14 @@
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) {