1 #include <stdio.h> 2 #include <unistd.h> 3 #include <asm/page.h> 4 #include <sys/swap.h> 5 6 int swapoff_main(int argc, char **argv) 7 { 8 int err = 0; 9 10 if (argc != 2) { 11 fprintf(stderr, "Usage: %s <filename>\n", argv[0]); 12 return -EINVAL; 13 } 14 15 err = swapoff(argv[1]); 16 if (err) { 17 fprintf(stderr, "swapoff failed for %s\n", argv[1]); 18 } 19 20 return err; 21 } 22