Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/util-linux/swaponoff.c
- Timestamp:
- Jan 1, 2014, 12:47:38 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mindi-busybox/util-linux/swaponoff.c
r2725 r3232 8 8 */ 9 9 10 //usage:#define swapon_trivial_usage 11 //usage: "[-a]" IF_FEATURE_SWAPON_PRI(" [-p PRI]") " [DEVICE]" 12 //usage:#define swapon_full_usage "\n\n" 13 //usage: "Start swapping on DEVICE\n" 14 //usage: "\n -a Start swapping on all swap devices" 15 //usage: IF_FEATURE_SWAPON_PRI( 16 //usage: "\n -p PRI Set swap device priority" 17 //usage: ) 18 //usage: 19 //usage:#define swapoff_trivial_usage 20 //usage: "[-a] [DEVICE]" 21 //usage:#define swapoff_full_usage "\n\n" 22 //usage: "Stop swapping on DEVICE\n" 23 //usage: "\n -a Stop swapping on all swap devices" 24 10 25 #include "libbb.h" 11 26 #include <mntent.h> 12 #include <sys/swap.h> 27 #ifndef __BIONIC__ 28 # include <sys/swap.h> 29 #endif 13 30 14 31 #if ENABLE_FEATURE_MOUNT_LABEL … … 16 33 #else 17 34 # define resolve_mount_spec(fsname) ((void)0) 35 #endif 36 37 #ifndef MNTTYPE_SWAP 38 # define MNTTYPE_SWAP "swap" 18 39 #endif 19 40 … … 27 48 #define g_flags 0 28 49 #endif 50 #define INIT_G() do { } while (0) 29 51 30 52 static int swap_enable_disable(char *device) … … 90 112 int ret; 91 113 114 INIT_G(); 115 92 116 #if !ENABLE_FEATURE_SWAPON_PRI 93 117 ret = getopt32(argv, "a"); 94 118 #else 95 opt_complementary = "p+"; 119 if (applet_name[5] == 'n') 120 opt_complementary = "p+"; 96 121 ret = getopt32(argv, (applet_name[5] == 'n') ? "ap:" : "a", &g_flags); 97 122
Note:
See TracChangeset
for help on using the changeset viewer.