1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
TP-Link_Archer-XR500v/BBA1.5_platform/apps/public/strace-4.16/swapon.c
2024-07-22 01:58:46 -03:00

24 lines
408 B
C

#include "defs.h"
#include <sys/swap.h>
#include "xlat/swap_flags.h"
SYS_FUNC(swapon)
{
unsigned int flags = tcp->u_arg[1];
unsigned int prio = flags & SWAP_FLAG_PRIO_MASK;
flags &= ~SWAP_FLAG_PRIO_MASK;
printpath(tcp, tcp->u_arg[0]);
tprints(", ");
if (flags) {
printflags(swap_flags, flags, "SWAP_FLAG_???");
tprintf("|%u", prio);
} else {
tprintf("%u", prio);
}
return RVAL_DECODED;
}