]> granicus.if.org Git - strace/blob - swapon.c
Update NEWS
[strace] / swapon.c
1 #include "defs.h"
2
3 #include <sys/swap.h>
4
5 #include "xlat/swap_flags.h"
6
7 SYS_FUNC(swapon)
8 {
9         unsigned int flags = tcp->u_arg[1];
10         unsigned int prio = flags & SWAP_FLAG_PRIO_MASK;
11         flags &= ~SWAP_FLAG_PRIO_MASK;
12
13         printpath(tcp, tcp->u_arg[0]);
14         tprints(", ");
15         if (flags) {
16                 printflags(swap_flags, flags, "SWAP_FLAG_???");
17                 tprintf("|%u", prio);
18         } else {
19                 tprintf("%u", prio);
20         }
21
22         return RVAL_DECODED;
23 }