Commit 600835d0 authored by Roberto Vargas's avatar Roberto Vargas
Browse files

make_cert: return error when invalid options are used



Print_help was used in different contexts and returning no
error in that function was hiding the error when incorrect
options were used.

Change-Id: Ic3f71748be7ff8440c9d54810b986e9f177f4439
Signed-off-by: default avatarRoberto Vargas <roberto.vargas@arm.com>
parent f790cc0a
...@@ -140,8 +140,6 @@ static void print_help(const char *cmd, const struct option *long_opt) ...@@ -140,8 +140,6 @@ static void print_help(const char *cmd, const struct option *long_opt)
i++; i++;
} }
printf("\n"); printf("\n");
exit(0);
} }
static int get_key_alg(const char *key_alg_str) static int get_key_alg(const char *key_alg_str)
...@@ -334,7 +332,7 @@ int main(int argc, char *argv[]) ...@@ -334,7 +332,7 @@ int main(int argc, char *argv[])
break; break;
case 'h': case 'h':
print_help(argv[0], cmd_opt); print_help(argv[0], cmd_opt);
break; exit(0);
case 'k': case 'k':
save_keys = 1; save_keys = 1;
break; break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment