blob: a2db301ee25990b2b392c1dfad4c1f7c5c803d2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/* COVERAGE: swapon swapoff */
#include <unistd.h>
#include <asm/page.h>
#include <sys/swap.h>
int main()
{
swapon("foobar_swap", 0);
// swapon ("foobar_swap", 0) =
swapon("foobar_swap", ((1 << SWAP_FLAG_PRIO_SHIFT) & SWAP_FLAG_PRIO_MASK) | SWAP_FLAG_PREFER);
// swapon ("foobar_swap", 32769) =
swapon("foobar_swap", ((7 << SWAP_FLAG_PRIO_SHIFT) & SWAP_FLAG_PRIO_MASK) | SWAP_FLAG_PREFER);
// swapon ("foobar_swap", 32775) =
swapon(0, 0);
// swapon (NULL, 0) =
swapoff("foobar_swap");
// swapoff ("foobar_swap") =
swapoff(0);
// swapoff (NULL) =
return 0;
}
|