summaryrefslogtreecommitdiff
path: root/src/usr.bin/openssl/apps.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/usr.bin/openssl/apps.c7
1 files changed, 6 insertions, 1 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) {