summaryrefslogtreecommitdiff
path: root/futility/cmd_vbutil_key.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2015-03-05 13:49:36 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-03-18 23:07:27 +0000
commit49a422fab9afb3f013ee6115738c7e13d9ec8191 (patch)
tree94b2c459ecbf8b4da641c0bd7df4af2153ee01c9 /futility/cmd_vbutil_key.c
parent7b50512ccf17f1a0f138c2ef2bb5d3984e0e89de (diff)
downloadvboot-49a422fab9afb3f013ee6115738c7e13d9ec8191.tar.gz
futility: change longhelp functions to take multiple args
Some of the help messages are getting pretty long. We should allow each command to provide additional help details only when asked. BUG=none BRANCH=none TEST=make runtests I also compared the help messages for all commands, both before and after this change to ensure that nothing was different. Change-Id: Ibe92ec80f99d286886fe020c9d826a5a05556471 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/260494 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'futility/cmd_vbutil_key.c')
-rw-r--r--futility/cmd_vbutil_key.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/futility/cmd_vbutil_key.c b/futility/cmd_vbutil_key.c
index de9f97ff..cfc21b7f 100644
--- a/futility/cmd_vbutil_key.c
+++ b/futility/cmd_vbutil_key.c
@@ -38,7 +38,7 @@ static const struct option long_opts[] = {
{NULL, 0, 0, 0}
};
-static void print_help(const char *progname)
+static void print_help(int argc, char *argv[])
{
int i;
@@ -51,7 +51,7 @@ static void print_help(const char *progname)
"(required for .keyb,\n"
" ignored for .pem)\n"
" --algorithm <number> "
- "Signing algorithm to use with key:\n", progname);
+ "Signing algorithm to use with key:\n", argv[0]);
for (i = 0; i < kNumAlgorithms; i++) {
printf(" %d = (%s)\n",
@@ -63,7 +63,7 @@ static void print_help(const char *progname)
"\n"
" Optional parameters:\n"
" --copyto <file> "
- "Write a copy of the key to this file.\n\n", progname);
+ "Write a copy of the key to this file.\n\n", argv[0]);
}
/* Pack a .keyb file into a .vbpubk, or a .pem into a .vbprivk */
@@ -218,7 +218,7 @@ static int do_vbutil_key(int argc, char *argv[])
}
if (parse_error) {
- print_help(argv[0]);
+ print_help(argc, argv);
return 1;
}
@@ -229,7 +229,7 @@ static int do_vbutil_key(int argc, char *argv[])
return Unpack(infile, outfile);
default:
printf("Must specify a mode.\n");
- print_help(argv[0]);
+ print_help(argc, argv);
return 1;
}
}