mirror of
https://github.com/xcat2/xNBA.git
synced 2025-02-06 22:11:57 +00:00
[getopt] Accept "--" as an end-of-options marker
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
parent
a1f618c625
commit
be90241ec2
@ -239,6 +239,11 @@ int getopt_long ( int argc, char * const argv[], const char *optstring,
|
||||
|
||||
/* Check for long options */
|
||||
if ( *(opttext++) == '-' ) {
|
||||
/* "--" indicates end of options */
|
||||
if ( *opttext == '\0' ) {
|
||||
optind++;
|
||||
return -1;
|
||||
}
|
||||
for ( longopt = longopts ; longopt->name ; longopt++ ) {
|
||||
if ( ! match_long_option ( argc, argv, opttext,
|
||||
longopt, &option ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user