diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/usr.bin/openssl/apps.c | 7 | ||||
| -rw-r--r-- | src/usr.bin/openssl/apps.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/usr.bin/openssl/apps.c b/src/usr.bin/openssl/apps.c index fc5e2d073a..4ae6f12c18 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.3 2014/08/27 15:51:41 jsing Exp $ */ | 1 | /* $OpenBSD: apps.c,v 1.4 2014/08/28 13:37:41 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -2277,6 +2277,7 @@ options_parse(int argc, char **argv, struct option *opts, char **unnamed) | |||
| 2277 | continue; | 2277 | continue; |
| 2278 | 2278 | ||
| 2279 | if (opt->type == OPTION_ARG || | 2279 | if (opt->type == OPTION_ARG || |
| 2280 | opt->type == OPTION_ARG_FORMAT || | ||
| 2280 | opt->type == OPTION_ARG_INT) { | 2281 | opt->type == OPTION_ARG_INT) { |
| 2281 | if (++i >= argc) { | 2282 | if (++i >= argc) { |
| 2282 | fprintf(stderr, | 2283 | fprintf(stderr, |
| @@ -2291,6 +2292,10 @@ options_parse(int argc, char **argv, struct option *opts, char **unnamed) | |||
| 2291 | *opt->opt.arg = argv[i]; | 2292 | *opt->opt.arg = argv[i]; |
| 2292 | break; | 2293 | break; |
| 2293 | 2294 | ||
| 2295 | case OPTION_ARG_FORMAT: | ||
| 2296 | *opt->opt.value = str2fmt(argv[i]); | ||
| 2297 | break; | ||
| 2298 | |||
| 2294 | case OPTION_ARG_INT: | 2299 | case OPTION_ARG_INT: |
| 2295 | val = strtonum(argv[i], 0, INT_MAX, &errstr); | 2300 | val = strtonum(argv[i], 0, INT_MAX, &errstr); |
| 2296 | if (errstr != NULL) { | 2301 | if (errstr != NULL) { |
diff --git a/src/usr.bin/openssl/apps.h b/src/usr.bin/openssl/apps.h index 43d119500f..fefceb7ddb 100644 --- a/src/usr.bin/openssl/apps.h +++ b/src/usr.bin/openssl/apps.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: apps.h,v 1.3 2014/08/27 15:51:41 jsing Exp $ */ | 1 | /* $OpenBSD: apps.h,v 1.4 2014/08/28 13:37:41 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -288,6 +288,7 @@ struct option { | |||
| 288 | const char *desc; | 288 | const char *desc; |
| 289 | enum { | 289 | enum { |
| 290 | OPTION_ARG, | 290 | OPTION_ARG, |
| 291 | OPTION_ARG_FORMAT, | ||
| 291 | OPTION_ARG_INT, | 292 | OPTION_ARG_INT, |
| 292 | OPTION_FLAG, | 293 | OPTION_FLAG, |
| 293 | OPTION_VALUE, | 294 | OPTION_VALUE, |
