提交 19948cea 编写于 作者: B Ben Laurie

Display brief help if no options for list.

Reviewed-by: NAndy Polyakov <appro@openssl.org>
上级 c58f3e42
......@@ -493,11 +493,12 @@ int list_main(int argc, char **argv)
{
char *prog;
HELPLIST_CHOICE o;
int done = 0;
prog = opt_init(argc, argv, list_options);
while ((o = opt_next()) != OPT_EOF) {
switch (o) {
case OPT_EOF:
case OPT_EOF: /* Never hit, but suppresses warning */
case OPT_ERR:
BIO_printf(bio_err, "%s: Use -help for summary.\n", prog);
return 1;
......@@ -526,6 +527,12 @@ int list_main(int argc, char **argv)
list_disabled();
break;
}
done = 1;
}
if (!done) {
BIO_printf(bio_err, "%s: Use -help for summary.\n", prog);
return 1;
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册