OSDN Git Service

Simplify/unify listfiles recursion: populate directory node (and detect top of tree...
[android-x86/external-toybox.git] / toys / swapoff.c
1 /* vi: set sw=4 ts=4:
2  *
3  * swapoff.c - Disable region for swapping
4  *
5  * Copyright 2012 Elie De Brauwer <eliedebrauwer@gmail.com>
6  *
7  * Not in SUSv4.
8
9 USE_SWAPOFF(NEWTOY(swapoff, "<1>1", TOYFLAG_BIN|TOYFLAG_NEEDROOT))
10
11 config SWAPOFF
12         bool "swapoff"
13         default y
14         help
15           usage: swapoff swapregion
16
17           Disable swapping on a given swapregion.
18 */
19
20 #include "toys.h"
21
22 void swapoff_main(void)
23 {
24         if (swapoff(toys.optargs[0]))
25                 perror_exit("failed to remove swaparea");
26 }