aboutsummaryrefslogtreecommitdiff
path: root/swaponoff.c
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-07-12 15:38:49 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-07-12 15:38:49 +0000
commit7b40def2e7abcaa81d71d4bc7717d184c329eb2d (patch)
tree46d579ac4ec39719ba3b8d18bbc1c359cc9939c5 /swaponoff.c
parentc6d230cee51799861dbc5e917a5919f33c6e5933 (diff)
downloadbusybox-w32-7b40def2e7abcaa81d71d4bc7717d184c329eb2d.tar.gz
busybox-w32-7b40def2e7abcaa81d71d4bc7717d184c329eb2d.tar.bz2
busybox-w32-7b40def2e7abcaa81d71d4bc7717d184c329eb2d.zip
Use global applet_name instead of local versions.
git-svn-id: svn://busybox.net/trunk/busybox@830 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'swaponoff.c')
-rw-r--r--swaponoff.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/swaponoff.c b/swaponoff.c
index b43f3cdc1..a79b93a23 100644
--- a/swaponoff.c
+++ b/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