Merge pull request #53 from rofl0r/getopt

Group getopt non-option arguments together for POSIX compat
This commit is contained in:
wiire-a 2017-10-08 16:22:14 +02:00 committed by GitHub
commit 9f39191ff2

View File

@ -41,7 +41,7 @@ uint32_t ecos_rand_simple(uint32_t *seed);
uint32_t ecos_rand_knuth(uint32_t *seed); uint32_t ecos_rand_knuth(uint32_t *seed);
uint_fast8_t crack(struct global *g, char *pin); uint_fast8_t crack(struct global *g, char *pin);
static const char *option_string = "e:r:s:z:a:n:m:b:Sflo:v:Vh?"; static const char *option_string = "e:r:s:z:a:n:m:b:o:v:SflVh?";
static const struct option long_options[] = { static const struct option long_options[] = {
{ "pke", required_argument, 0, 'e' }, { "pke", required_argument, 0, 'e' },
{ "pkr", required_argument, 0, 'r' }, { "pkr", required_argument, 0, 'r' },
@ -51,11 +51,11 @@ static const struct option long_options[] = {
{ "e-nonce", required_argument, 0, 'n' }, { "e-nonce", required_argument, 0, 'n' },
{ "r-nonce", required_argument, 0, 'm' }, { "r-nonce", required_argument, 0, 'm' },
{ "e-bssid", required_argument, 0, 'b' }, { "e-bssid", required_argument, 0, 'b' },
{ "output", required_argument, 0, 'o' },
{ "verbosity", required_argument, 0, 'v' },
{ "dh-small", no_argument, 0, 'S' }, { "dh-small", no_argument, 0, 'S' },
{ "force", no_argument, 0, 'f' }, { "force", no_argument, 0, 'f' },
{ "length", no_argument, 0, 'l' }, { "length", no_argument, 0, 'l' },
{ "output", required_argument, 0, 'o' },
{ "verbosity", required_argument, 0, 'v' },
{ "version", no_argument, 0, 'V' }, { "version", no_argument, 0, 'V' },
{ "help", no_argument, 0, 0 }, { "help", no_argument, 0, 0 },
{ "mode", required_argument, 0, 1 }, { "mode", required_argument, 0, 1 },