1 /* swapoff.c - Disable region for swapping
2  *
3  * Copyright 2012 Elie De Brauwer <eliedebrauwer@gmail.com>
4 
5 USE_SWAPOFF(NEWTOY(swapoff, "<1>1", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
6 
7 config SWAPOFF
8   bool "swapoff"
9   default y
10   help
11     usage: swapoff swapregion
12 
13     Disable swapping on a given swapregion.
14 */
15 
16 #include "toys.h"
17 
swapoff_main(void)18 void swapoff_main(void)
19 {
20   if (swapoff(toys.optargs[0])) perror_exit("failed to remove swaparea");
21 }
22