aboutsummaryrefslogtreecommitdiff
path: root/src/linux/swapon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/linux/swapon.c')
-rw-r--r--src/linux/swapon.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/linux/swapon.c b/src/linux/swapon.c
new file mode 100644
index 0000000..13d2876
--- /dev/null
+++ b/src/linux/swapon.c
@@ -0,0 +1,8 @@
+#include <sys/swap.h>
+#define SYSCALL_STANDALONE
+#include "syscall.h"
+
+int swapon(const char *path, int flags)
+{
+ return syscall2(__NR_swapon, (long)path, flags);
+}