[LTP] [PATCH 1/3] lapi: fallback definitions for swapon syscall
Andrea Cervesato
andrea.cervesato@suse.de
Thu Aug 27 13:54:04 CEST 2026
From: Andrea Cervesato <andrea.cervesato@suse.com>
Introduce fallback definition inside lapi for:
- SWAP_FLAG_PREFER
- SWAP_FLAG_PRIO_MASK
- SWAP_FLAG_DISCARD
- SWAP_FLAG_DISCARD_ONCE
- SWAP_FLAG_DISCARD_PAGES
Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
---
include/tse_swap.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/tse_swap.h b/include/tse_swap.h
index c4979b3e5..25fe4ad77 100644
--- a/include/tse_swap.h
+++ b/include/tse_swap.h
@@ -14,6 +14,22 @@
#ifndef TSE_SWAP_H__
#define TSE_SWAP_H__
+#ifndef SWAP_FLAG_PREFER
+# define SWAP_FLAG_PREFER 0x8000
+#endif
+#ifndef SWAP_FLAG_PRIO_MASK
+# define SWAP_FLAG_PRIO_MASK 0x7fff
+#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
+
enum swapfile_method {
SWAPFILE_BY_SIZE,
SWAPFILE_BY_BLKS
--
2.51.0
More information about the ltp
mailing list