#include "defs.h"
#include <dirent.h>
+#include <sys/swap.h>
struct kernel_dirent {
unsigned long d_ino;
}
return 0;
}
+
+static const struct xlat swap_flags[] = {
+ { SWAP_FLAG_PREFER, "SWAP_FLAG_PREFER" },
+ { SWAP_FLAG_DISCARD, "SWAP_FLAG_DISCARD" },
+ { 0, NULL }
+};
+
+int
+sys_swapon(struct tcb *tcp)
+{
+ if (entering(tcp)) {
+ int flags = tcp->u_arg[1];
+ printpath(tcp, tcp->u_arg[0]);
+ tprints(", ");
+ printflags(swap_flags, flags & ~SWAP_FLAG_PRIO_MASK,
+ "SWAP_FLAG_???");
+ if (flags & SWAP_FLAG_PREFER)
+ tprintf("|%d", flags & SWAP_FLAG_PRIO_MASK);
+ }
+ return 0;
+}
#define sys_rmdir sys_chdir
#define sys_sched_get_priority_max sys_sched_get_priority_min
#define sys_swapoff sys_chdir
-#define sys_swapon sys_chdir
#define sys_symlink sys_link
#define sys_syncfs sys_close
#define sys_umount sys_chdir