diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-04-11 03:58:30 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-04-11 03:58:30 +0200 |
commit | c13ee8c0f32fa816e12f1ac0c55a800066dc1560 (patch) | |
tree | 3ef3009d96c7d1273f556e3d5c84919c4fc76c30 /coreutils/basename.c | |
parent | 6161cdbb83bc35c20cf582bfce203f3e0632fbda (diff) | |
download | busybox-w32-c13ee8c0f32fa816e12f1ac0c55a800066dc1560.tar.gz busybox-w32-c13ee8c0f32fa816e12f1ac0c55a800066dc1560.tar.bz2 busybox-w32-c13ee8c0f32fa816e12f1ac0c55a800066dc1560.zip |
basename,dirname,freeramdisk,rx,raidautorun,runsv,chvt: skip "--" argument
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/basename.c')
-rw-r--r-- | coreutils/basename.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/coreutils/basename.c b/coreutils/basename.c index 177e023cd..1f7a13713 100644 --- a/coreutils/basename.c +++ b/coreutils/basename.c | |||
@@ -51,6 +51,11 @@ int basename_main(int argc, char **argv) | |||
51 | size_t m, n; | 51 | size_t m, n; |
52 | char *s; | 52 | char *s; |
53 | 53 | ||
54 | if (argv[1] && strcmp(argv[1], "--") == 0) { | ||
55 | argv++; | ||
56 | argc--; | ||
57 | } | ||
58 | |||
54 | if ((unsigned)(argc-2) >= 2) { | 59 | if ((unsigned)(argc-2) >= 2) { |
55 | bb_show_usage(); | 60 | bb_show_usage(); |
56 | } | 61 | } |