summaryrefslogtreecommitdiff
path: root/util-linux/swaponoff.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-07-12 15:38:49 +0000
committerMatt Kraai <kraai@debian.org>2000-07-12 15:38:49 +0000
commite58771e73c0d8589a458ede4088f5ba70eff917b (patch)
tree46d579ac4ec39719ba3b8d18bbc1c359cc9939c5 /util-linux/swaponoff.c
parente714bce003a1b0e2c49e58fe14af86abc8b31f23 (diff)
downloadbusybox-w32-e58771e73c0d8589a458ede4088f5ba70eff917b.tar.gz
busybox-w32-e58771e73c0d8589a458ede4088f5ba70eff917b.tar.bz2
busybox-w32-e58771e73c0d8589a458ede4088f5ba70eff917b.zip
Use global applet_name instead of local versions.
Diffstat (limited to 'util-linux/swaponoff.c')
-rw-r--r--util-linux/swaponoff.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index b43f3cdc1..a79b93a23 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -34,7 +34,6 @@ _syscall1(int, swapoff, const char *, path);
34 34
35 35
36static int whichApp; 36static int whichApp;
37static const char *appName;
38 37
39static const char swapoff_usage[] = 38static const char swapoff_usage[] =
40 "swapoff [OPTION] [device]\n" 39 "swapoff [OPTION] [device]\n"
@@ -69,7 +68,7 @@ static void swap_enable_disable(char *device)
69 status = swapoff(device); 68 status = swapoff(device);
70 69
71 if (status != 0) { 70 if (status != 0) {
72 perror(appName); 71 perror(applet_name);
73 exit(FALSE); 72 exit(FALSE);
74 } 73 }
75} 74}
@@ -95,12 +94,9 @@ static void do_em_all()
95 94
96extern int swap_on_off_main(int argc, char **argv) 95extern int swap_on_off_main(int argc, char **argv)
97{ 96{
98 if (strcmp(*argv, "swapon") == 0) { 97 if (strcmp(applet_name, "swapon") == 0) {
99 appName = *argv;
100 whichApp = SWAPON_APP; 98 whichApp = SWAPON_APP;
101
102 } else { 99 } else {
103 appName = *argv;
104 whichApp = SWAPOFF_APP; 100 whichApp = SWAPOFF_APP;
105 } 101 }
106 102