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