]> granicus.if.org Git - strace/commitdiff
s390: use printxvals_ex for command printing in s390_runtime_instr
authorEugene Syromyatnikov <evgsyr@gmail.com>
Wed, 4 Apr 2018 13:42:00 +0000 (15:42 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 27 Apr 2018 00:56:25 +0000 (00:56 +0000)
* s390.c (SYS_FUNC(s390_runtime_instr)): Replace manual command argument
decoding with a printxvals_ex call.

s390.c

diff --git a/s390.c b/s390.c
index 222fd01f4b99b72ae32fc9c2d185e9ae627dfec8..39377ea49d1c6ea871a7a6abeb35dc2bd9f7f0eb 100644 (file)
--- a/s390.c
+++ b/s390.c
@@ -1204,12 +1204,10 @@ SYS_FUNC(s390_runtime_instr)
        int command = (int) tcp->u_arg[0];
        int signum = (int) tcp->u_arg[1];
 
-       const char *command_descr =
-               xlookup(s390_runtime_instr_commands, command);
 
-       tprintf("%d", command);
-       tprints_comment(command_descr ? command_descr :
-                       "S390_RUNTIME_INSTR_???");
+       printxvals_ex(command, "S390_RUNTIME_INSTR_???",
+                     XLAT_STYLE_VERBOSE | XLAT_STYLE_FMT_D,
+                     s390_runtime_instr_commands, NULL);
 
        /*
         * signum is ignored since Linux 4.4, but let's print it for start