diff options
author | Kinichiro Inoguchi <inoguchi@cvs.openbsd.org> | 2020-09-09 12:47:47 +0000 |
---|---|---|
committer | Kinichiro Inoguchi <inoguchi@cvs.openbsd.org> | 2020-09-09 12:47:47 +0000 |
commit | ee462f338f76049e4fd1ca37a8d0edd2936affd0 (patch) | |
tree | 57b5859ea1d484b12485036cc83828fee7b7aaee /usr.bin | |
parent | 433bd7a6625bd72fafa5978ae0ad7431ad02ac6b (diff) |
Add option type OPTION_UL_VALUE_OR
ok tb@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/openssl/apps.c | 6 | ||||
-rw-r--r-- | usr.bin/openssl/apps.h | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/openssl/apps.c b/usr.bin/openssl/apps.c index c9a2f34b253..2c2f1284848 100644 --- a/usr.bin/openssl/apps.c +++ b/usr.bin/openssl/apps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apps.c,v 1.54 2019/07/14 03:30:45 guenther Exp $ */ +/* $OpenBSD: apps.c,v 1.55 2020/09/09 12:47:46 inoguchi Exp $ */ /* * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> * @@ -2299,6 +2299,10 @@ options_parse(int argc, char **argv, const struct option *opts, char **unnamed, *opt->opt.value |= opt->value; break; + case OPTION_UL_VALUE_OR: + *opt->opt.ulvalue |= opt->ulvalue; + break; + default: fprintf(stderr, "option %s - unknown type %i\n", opt->name, opt->type); diff --git a/usr.bin/openssl/apps.h b/usr.bin/openssl/apps.h index 48e5ba3adb9..10612a9c979 100644 --- a/usr.bin/openssl/apps.h +++ b/usr.bin/openssl/apps.h @@ -1,4 +1,4 @@ -/* $OpenBSD: apps.h,v 1.23 2019/07/14 03:30:45 guenther Exp $ */ +/* $OpenBSD: apps.h,v 1.24 2020/09/09 12:47:46 inoguchi Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -303,6 +303,7 @@ struct option { OPTION_VALUE, OPTION_VALUE_AND, OPTION_VALUE_OR, + OPTION_UL_VALUE_OR, } type; union { char **arg; @@ -312,9 +313,11 @@ struct option { int (*func)(void); long *lvalue; int *value; + unsigned long *ulvalue; time_t *tvalue; } opt; const int value; + const unsigned long ulvalue; }; void options_usage(const struct option *opts); |