mirror of
https://github.com/topjohnwu/ndk-busybox.git
synced 2024-11-23 11:49:39 +00:00
basename,dirname,freeramdisk,rx,raidautorun,runsv,chvt: skip "--" argument
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
6161cdbb83
commit
c13ee8c0f3
@ -51,6 +51,11 @@ int basename_main(int argc, char **argv)
|
||||
size_t m, n;
|
||||
char *s;
|
||||
|
||||
if (argv[1] && strcmp(argv[1], "--") == 0) {
|
||||
argv++;
|
||||
argc--;
|
||||
}
|
||||
|
||||
if ((unsigned)(argc-2) >= 2) {
|
||||
bb_show_usage();
|
||||
}
|
||||
|
@ -10,6 +10,8 @@
|
||||
|
||||
char* FAST_FUNC single_argv(char **argv)
|
||||
{
|
||||
if (argv[1] && strcmp(argv[1], "--") == 0)
|
||||
argv++;
|
||||
if (!argv[1] || argv[2])
|
||||
bb_show_usage();
|
||||
return argv[1];
|
||||
|
Loading…
Reference in New Issue
Block a user