blob: aba5a6131f62a5bfacb434a0039c3e704f04d37d [file] [log] [blame]
Dmitry V. Levin7aa9c0d2015-11-22 18:35:27 +00001#include "defs.h"
2#include "xlat/kcmp_types.h"
3
4SYS_FUNC(kcmp)
5{
6 pid_t pid1 = tcp->u_arg[0];
7 pid_t pid2 = tcp->u_arg[1];
8 int type = tcp->u_arg[2];
9 unsigned long idx1 = tcp->u_arg[3];
10 unsigned long idx2 = tcp->u_arg[4];
11
12 tprintf("%d, %d, ", pid1, pid2);
13 printxval(kcmp_types, type, "KCMP_???");
14
15 switch(type) {
16 case KCMP_FILE:
17 tprintf(", %u, %u", (unsigned) idx1, (unsigned) idx2);
18 break;
19 case KCMP_FILES:
20 case KCMP_FS:
21 case KCMP_IO:
22 case KCMP_SIGHAND:
23 case KCMP_SYSVSEM:
24 case KCMP_VM:
25 break;
26 default:
27 tprintf(", %#lx, %#lx", idx1, idx2);
28 }
29
30 return RVAL_DECODED;
31}