Add new argument type CRYPT_ARG_ALIAS.

It can be used to easily define option
aliases for command line utilities.
This commit is contained in:
Ondrej Kozina
2022-03-29 12:51:53 +02:00
parent e4ed545cbf
commit e2a5af9e64
4 changed files with 28 additions and 1 deletions

View File

@@ -75,6 +75,9 @@ void tools_parse_arg_value(poptContext popt_context, crypt_arg_type_info type, s
arg->u.u64_value = ull;
}
break;
case CRYPT_ARG_ALIAS:
tools_parse_arg_value(popt_context, arg->u.o.ptr->type, arg->u.o.ptr, popt_arg, arg->u.o.id, needs_size_conv_fn);
break;
default:
/* this signals internal tools coding mistake */
abort();