Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-07-12 19:38:49 +0400
committerMatt Kraai <kraai@debian.org>2000-07-12 19:38:49 +0400
commite58771e73c0d8589a458ede4088f5ba70eff917b (patch)
tree46d579ac4ec39719ba3b8d18bbc1c359cc9939c5 /swaponoff.c
parente714bce003a1b0e2c49e58fe14af86abc8b31f23 (diff)
Use global applet_name instead of local versions.
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);
static int whichApp;
-static const char *appName;
static const char swapoff_usage[] =
"swapoff [OPTION] [device]\n"
@@ -69,7 +68,7 @@ static void swap_enable_disable(char *device)
status = swapoff(device);
if (status != 0) {
- perror(appName);
+ perror(applet_name);
exit(FALSE);
}
}
@@ -95,12 +94,9 @@ static void do_em_all()
extern int swap_on_off_main(int argc, char **argv)
{
- if (strcmp(*argv, "swapon") == 0) {
- appName = *argv;
+ if (strcmp(applet_name, "swapon") == 0) {
whichApp = SWAPON_APP;
-
} else {
- appName = *argv;
whichApp = SWAPOFF_APP;
}