Skip to content

Commit 63bae23

Browse files
committed
swapon.c: move fallback definitions of swap options to xlat/
* swapon.c: Move definitions of SWAP_FLAG_* flags ... * xlat/swap_flags.in: ... here.
1 parent 69c1c4e commit 63bae23

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

swapon.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,6 @@
22

33
#include <sys/swap.h>
44

5-
#ifndef SWAP_FLAG_PREFER
6-
# define SWAP_FLAG_PREFER 0x8000
7-
#endif
8-
#ifndef SWAP_FLAG_DISCARD
9-
# define SWAP_FLAG_DISCARD 0x10000
10-
#endif
11-
#ifndef SWAP_FLAG_DISCARD_ONCE
12-
# define SWAP_FLAG_DISCARD_ONCE 0x20000
13-
#endif
14-
#ifndef SWAP_FLAG_DISCARD_PAGES
15-
# define SWAP_FLAG_DISCARD_PAGES 0x40000
16-
#endif
17-
185
#include "xlat/swap_flags.h"
196

207
SYS_FUNC(swapon)

xlat/swap_flags.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SWAP_FLAG_PREFER
2-
SWAP_FLAG_DISCARD
3-
SWAP_FLAG_DISCARD_ONCE
4-
SWAP_FLAG_DISCARD_PAGES
1+
SWAP_FLAG_PREFER 0x8000
2+
SWAP_FLAG_DISCARD 0x10000
3+
SWAP_FLAG_DISCARD_ONCE 0x20000
4+
SWAP_FLAG_DISCARD_PAGES 0x40000

0 commit comments

Comments
 (0)