6 const char swapon_usage[] = "swapon block-device\n"
8 "\tSwap virtual memory pages on the given device.\n";
11 swapon_fn(const struct FileInfo * i)
16 if (!(swapon(i->source, 0))) {
17 if ((swapsTable = setmntent("/etc/swaps", "a+"))) {
18 /* Needs the cast to avoid warning about conversion from
19 * const char* to just char*
21 m.mnt_fsname = (char*)i->source;
27 addmntent(swapsTable, &m);
28 endmntent(swapsTable);