diff options
author | Eric Andersen | 1999-10-18 21:22:59 +0000 |
---|---|---|
committer | Eric Andersen | 1999-10-18 21:22:59 +0000 |
commit | 8759006b55c617811a207cc4e99792996c8b97fb (patch) | |
tree | ae74dfbfd1ea2d85e54673de631471ab40fc277a /swapon.c | |
parent | 7f04b5e3208882eaeabb8c11d64c9b6e90d3e253 (diff) | |
download | busybox-8759006b55c617811a207cc4e99792996c8b97fb.zip busybox-8759006b55c617811a207cc4e99792996c8b97fb.tar.gz |
More fixes
Diffstat (limited to 'swapon.c')
-rw-r--r-- | swapon.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/swapon.c b/swapon.c deleted file mode 100644 index 78360a5..0000000 --- a/swapon.c +++ /dev/null @@ -1,34 +0,0 @@ -#include <stdio.h> -#include <mntent.h> -#include <sys/swap.h> -#include "internal.h" - -const char swapon_usage[] = "swapon block-device\n" -"\n" -"\tSwap virtual memory pages on the given device.\n"; - -extern int -swapon_fn(const struct FileInfo * i) -{ - FILE *swapsTable; - struct mntent m; - - if (!(swapon(i->source, 0))) { - if ((swapsTable = setmntent("/etc/swaps", "a+"))) { - /* Needs the cast to avoid warning about conversion from - * const char* to just char* - */ - m.mnt_fsname = (char*)i->source; - m.mnt_dir = "none"; - m.mnt_type = "swap"; - m.mnt_opts = "sw"; - m.mnt_freq = 0; - m.mnt_passno = 0; - addmntent(swapsTable, &m); - endmntent(swapsTable); - } - return (0); - } - return (-1); -} - |