nsenter: stop option parsing on 1st non-option

"nsenter ls -l" gives: invalid option -- 'l'

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2020-12-12 08:44:32 +01:00
parent 030fe31760
commit ef2366cdca
2 changed files with 3 additions and 2 deletions

View File

@@ -1522,7 +1522,7 @@ int find_main(int argc UNUSED_PARAM, char **argv)
}
*past_HLP = NULL;
/* "+": stop on first non-option */
i = getopt32(argv, "+HLP");
i = getopt32(argv, "+""HLP");
if (i & (1<<0))
G.recurse_flags |= ACTION_FOLLOWLINKS_L0 | ACTION_DANGLING_OK;
if (i & (1<<1))