blob: 5f6df0b853177ed1ef97ac83af19f6fe15e161c0 [file] [log] [blame]
Dmitry V. Levin85a364a2014-12-06 03:53:16 +00001#include "defs.h"
2
3#include <sys/swap.h>
4
Dmitry V. Levin85a364a2014-12-06 03:53:16 +00005#include "xlat/swap_flags.h"
6
Dmitry V. Levina0bd3742015-04-07 01:36:50 +00007SYS_FUNC(swapon)
Dmitry V. Levin85a364a2014-12-06 03:53:16 +00008{
Dmitry V. Levin9afb4d02015-07-16 23:28:07 +00009 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. Levin85a364a2014-12-06 03:53:16 +000019}