s390: simplify s390_runtime_instr command printing
As the header with command definitions is now a part of UAPI (since Linux commit v4.16-rc1~21^2~11), there's no need for a very special printing routine for command names. * s390.c (SYS_FUNC(s390_runtime_instr)): Use printxval_d to print the command argument. * tests/s390_runtime_instr.c: Update expected output.
This commit is contained in:
parent
5b4317dcc8
commit
e77cec74e0
5
s390.c
5
s390.c
@ -1205,9 +1205,8 @@ SYS_FUNC(s390_runtime_instr)
|
||||
int signum = (int) tcp->u_arg[1];
|
||||
|
||||
|
||||
printxvals_ex(command, "S390_RUNTIME_INSTR_???",
|
||||
XLAT_STYLE_VERBOSE | XLAT_STYLE_FMT_D,
|
||||
s390_runtime_instr_commands, NULL);
|
||||
printxval_d(s390_runtime_instr_commands, command,
|
||||
"S390_RUNTIME_INSTR_???");
|
||||
|
||||
/*
|
||||
* signum is ignored since Linux 4.4, but let's print it for start
|
||||
|
@ -353,7 +353,7 @@ rt_tgsigqueueinfo -esignal=none
|
||||
s390_guarded_storage -a32
|
||||
s390_guarded_storage-v -e trace=s390_guarded_storage -a32 -v
|
||||
s390_pci_mmio_read_write -e trace=s390_pci_mmio_read,s390_pci_mmio_write -a30
|
||||
s390_runtime_instr -a50
|
||||
s390_runtime_instr -a44
|
||||
s390_sthyi -a47
|
||||
s390_sthyi-v -e trace=s390_sthyi -a47 -v
|
||||
sched test_trace_expr times -e/sched
|
||||
|
@ -44,10 +44,11 @@ main(void)
|
||||
kernel_ulong_t cmd;
|
||||
const char * cmd_str;
|
||||
} cmd_args[] = {
|
||||
{ 0, "???" },
|
||||
{ 4, "???" },
|
||||
{ (kernel_ulong_t) 0xdeafbeefdeadc0deULL, "???" },
|
||||
{ 2, "STOP", },
|
||||
{ 0, "0 /* S390_RUNTIME_INSTR_??? */" },
|
||||
{ 4, "4 /* S390_RUNTIME_INSTR_??? */" },
|
||||
{ (kernel_ulong_t) 0xdeafbeefdeadc0deULL,
|
||||
"-559038242 /* S390_RUNTIME_INSTR_??? */" },
|
||||
{ 2, "S390_RUNTIME_INSTR_STOP" },
|
||||
};
|
||||
|
||||
static struct {
|
||||
@ -66,10 +67,8 @@ main(void)
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(cmd_args); i++) {
|
||||
rc = syscall(__NR_s390_runtime_instr, cmd_args[i].cmd, 0xdead);
|
||||
printf("s390_runtime_instr(%d /* S390_RUNTIME_INSTR_%s */) = "
|
||||
"%s\n",
|
||||
(int) cmd_args[i].cmd, cmd_args[i].cmd_str,
|
||||
sprintrc(rc));
|
||||
printf("s390_runtime_instr(%s) = %s\n",
|
||||
cmd_args[i].cmd_str, sprintrc(rc));
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(start_sig_args); i++) {
|
||||
@ -77,7 +76,7 @@ main(void)
|
||||
|
||||
rc = syscall(__NR_s390_runtime_instr, 1, start_sig_args[i].sig);
|
||||
saved_errno = errno;
|
||||
printf("s390_runtime_instr(1 /* S390_RUNTIME_INSTR_START */, ");
|
||||
printf("s390_runtime_instr(S390_RUNTIME_INSTR_START, ");
|
||||
|
||||
if (start_sig_args[i].sig_str)
|
||||
printf("%s", start_sig_args[i].sig_str);
|
||||
|
Loading…
x
Reference in New Issue
Block a user