10f66f451Sopenharmony_ci/* swapoff.c - Disable region for swapping
20f66f451Sopenharmony_ci *
30f66f451Sopenharmony_ci * Copyright 2012 Elie De Brauwer <eliedebrauwer@gmail.com>
40f66f451Sopenharmony_ci
50f66f451Sopenharmony_ciUSE_SWAPOFF(NEWTOY(swapoff, "<1>1", TOYFLAG_SBIN|TOYFLAG_NEEDROOT))
60f66f451Sopenharmony_ci
70f66f451Sopenharmony_ciconfig SWAPOFF
80f66f451Sopenharmony_ci  bool "swapoff"
90f66f451Sopenharmony_ci  default y
100f66f451Sopenharmony_ci  help
110f66f451Sopenharmony_ci    usage: swapoff swapregion
120f66f451Sopenharmony_ci
130f66f451Sopenharmony_ci    Disable swapping on a given swapregion.
140f66f451Sopenharmony_ci*/
150f66f451Sopenharmony_ci
160f66f451Sopenharmony_ci#include "toys.h"
170f66f451Sopenharmony_ci
180f66f451Sopenharmony_civoid swapoff_main(void)
190f66f451Sopenharmony_ci{
200f66f451Sopenharmony_ci  if (swapoff(toys.optargs[0])) perror_exit("failed to remove swaparea");
210f66f451Sopenharmony_ci}
22