Dmitry V. Levin | 85a364a | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 1 | #include "defs.h" |
| 2 | |
| 3 | #include <sys/swap.h> |
| 4 | |
Dmitry V. Levin | 85a364a | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 5 | #include "xlat/swap_flags.h" |
| 6 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame] | 7 | SYS_FUNC(swapon) |
Dmitry V. Levin | 85a364a | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 8 | { |
Dmitry V. Levin | 9afb4d0 | 2015-07-16 23:28:07 +0000 | [diff] [blame] | 9 | int flags = tcp->u_arg[1]; |
| 10 | |
| 11 | printpath(tcp, tcp->u_arg[0]); |
| 12 | tprints(", "); |
| 13 | printflags(swap_flags, flags & ~SWAP_FLAG_PRIO_MASK, |
| 14 | "SWAP_FLAG_???"); |
| 15 | if (flags & SWAP_FLAG_PREFER) |
| 16 | tprintf("|%d", flags & SWAP_FLAG_PRIO_MASK); |
| 17 | |
| 18 | return RVAL_DECODED; |
Dmitry V. Levin | 85a364a | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 19 | } |