aboutsummaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
authorGravatar Glenn L McGrath <bug1@ihug.co.nz>2003-10-03 03:25:30 +0000
committerGravatar Glenn L McGrath <bug1@ihug.co.nz>2003-10-03 03:25:30 +0000
commitcb920d9778397628ca4f0e31b3e106ee82db6def (patch)
treec882576cab27fd24cad990c55183fce314135f08 /applets
parent91b3d460c719606391e24905ee4969524f8b3162 (diff)
downloadbusybox-cb920d9778397628ca4f0e31b3e106ee82db6def.tar.gz
busybox-cb920d9778397628ca4f0e31b3e106ee82db6def.tar.bz2
Patch from Rob Landley, Simplify organisation of arguments.
Diffstat (limited to 'applets')
-rw-r--r--applets/busybox.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/applets/busybox.c b/applets/busybox.c
index 457a85a68..0acb428f4 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -98,7 +98,7 @@ int main(int argc, char **argv)
int busybox_main(int argc, char **argv)
{
- int col = 0, len, i;
+ int col = 0;
#ifdef CONFIG_FEATURE_INSTALLER
/*
@@ -161,18 +161,7 @@ int busybox_main(int argc, char **argv)
/* Flag that we've been here already */
been_there_done_that = 1;
- /* Move the command line down a notch */
- len = argv[argc] + strlen(argv[argc]) - argv[1];
- memmove(argv[0], argv[1], len);
- memset(argv[0] + len, 0, argv[1] - argv[0]);
-
- /* Fix up the argv pointers */
- len = argv[1] - argv[0];
- memmove(argv, argv + 1, sizeof(char *) * (argc + 1));
- for (i = 0; i < argc; i++)
- argv[i] -= len;
-
- return (main(argc, argv));
+ return (main(argc-1, argv+1));
}
/*