blob: d8f6a0064976bb745a8909344386826187dbb078 [file] [log] [blame]
Rom Lemarchand367297c2013-06-05 13:25:12 -07001#include <stdio.h>
2#include <unistd.h>
Rom Lemarchand367297c2013-06-05 13:25:12 -07003#include <sys/swap.h>
4
5int swapoff_main(int argc, char **argv)
6{
7 int err = 0;
8
9 if (argc != 2) {
10 fprintf(stderr, "Usage: %s <filename>\n", argv[0]);
11 return -EINVAL;
12 }
13
14 err = swapoff(argv[1]);
15 if (err) {
16 fprintf(stderr, "swapoff failed for %s\n", argv[1]);
17 }
18
19 return err;
20}