diff options
Diffstat (limited to 'src/usr.bin/openssl/apps.c')
| -rw-r--r-- | src/usr.bin/openssl/apps.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/usr.bin/openssl/apps.c b/src/usr.bin/openssl/apps.c index 76977ec44a..7a5def5007 100644 --- a/src/usr.bin/openssl/apps.c +++ b/src/usr.bin/openssl/apps.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: apps.c,v 1.7 2014/08/28 13:55:19 jsing Exp $ */ | 1 | /* $OpenBSD: apps.c,v 1.8 2014/08/28 14:15:28 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -2280,6 +2280,7 @@ options_parse(int argc, char **argv, struct option *opts, char **unnamed) | |||
| 2280 | 2280 | ||
| 2281 | if (opt->type == OPTION_ARG || | 2281 | if (opt->type == OPTION_ARG || |
| 2282 | opt->type == OPTION_ARG_FORMAT || | 2282 | opt->type == OPTION_ARG_FORMAT || |
| 2283 | opt->type == OPTION_ARG_FUNC || | ||
| 2283 | opt->type == OPTION_ARG_INT) { | 2284 | opt->type == OPTION_ARG_INT) { |
| 2284 | if (++i >= argc) { | 2285 | if (++i >= argc) { |
| 2285 | fprintf(stderr, | 2286 | fprintf(stderr, |
| @@ -2305,6 +2306,11 @@ options_parse(int argc, char **argv, struct option *opts, char **unnamed) | |||
| 2305 | *opt->opt.value = fmt; | 2306 | *opt->opt.value = fmt; |
| 2306 | break; | 2307 | break; |
| 2307 | 2308 | ||
| 2309 | case OPTION_ARG_FUNC: | ||
| 2310 | if (opt->opt.func(opt, argv[i]) != 0) | ||
| 2311 | return (1); | ||
| 2312 | break; | ||
| 2313 | |||
| 2308 | case OPTION_ARG_INT: | 2314 | case OPTION_ARG_INT: |
| 2309 | val = strtonum(argv[i], 0, INT_MAX, &errstr); | 2315 | val = strtonum(argv[i], 0, INT_MAX, &errstr); |
| 2310 | if (errstr != NULL) { | 2316 | if (errstr != NULL) { |
