swapon.c: move fallback definitions of swap options to xlat/

* swapon.c: Move definitions of SWAP_FLAG_* flags ...
* xlat/swap_flags.in: ... here.
This commit is contained in:
Дмитрий Левин 2015-07-16 23:25:36 +00:00
parent 69c1c4e46a
commit 63bae232d2
2 changed files with 4 additions and 17 deletions

View File

@ -2,19 +2,6 @@
#include <sys/swap.h>
#ifndef SWAP_FLAG_PREFER
# define SWAP_FLAG_PREFER 0x8000
#endif
#ifndef SWAP_FLAG_DISCARD
# define SWAP_FLAG_DISCARD 0x10000
#endif
#ifndef SWAP_FLAG_DISCARD_ONCE
# define SWAP_FLAG_DISCARD_ONCE 0x20000
#endif
#ifndef SWAP_FLAG_DISCARD_PAGES
# define SWAP_FLAG_DISCARD_PAGES 0x40000
#endif
#include "xlat/swap_flags.h"
SYS_FUNC(swapon)

View File

@ -1,4 +1,4 @@
SWAP_FLAG_PREFER
SWAP_FLAG_DISCARD
SWAP_FLAG_DISCARD_ONCE
SWAP_FLAG_DISCARD_PAGES
SWAP_FLAG_PREFER 0x8000
SWAP_FLAG_DISCARD 0x10000
SWAP_FLAG_DISCARD_ONCE 0x20000
SWAP_FLAG_DISCARD_PAGES 0x40000