xref: /third_party/toybox/toys/other/swapoff.c (revision 0f66f451)
1/* swapoff.c - Disable region for swapping
2 *
3 * Copyright 2012 Elie De Brauwer <eliedebrauwer@gmail.com>
4
5USE_SWAPOFF(NEWTOY(swapoff, "<1>1", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
6
7config 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
18void swapoff_main(void)
19{
20  if (swapoff(toys.optargs[0])) perror_exit("failed to remove swaparea");
21}
22