summaryrefslogtreecommitdiff
path: root/futility/cmd_create.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_create.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_create.c')
-rw-r--r--futility/cmd_create.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/futility/cmd_create.c b/futility/cmd_create.c
index db668b2c..6138f428 100644
--- a/futility/cmd_create.c
+++ b/futility/cmd_create.c
@@ -51,12 +51,12 @@ 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[])
{
struct vb2_text_vs_enum *entry;
printf("\n"
-"Usage: " MYNAME " %s [options] <INFILE> [<BASENAME>]\n", progname);
+"Usage: " MYNAME " %s [options] <INFILE> [<BASENAME>]\n", argv[0]);
printf("\n"
"Create a keypair from an RSA key (.pem file).\n"
"\n"
@@ -362,7 +362,7 @@ static int do_create(int argc, char *argv[])
}
if (errorcnt) {
- print_help(argv[0]);
+ print_help(argc, argv);
return 1;
}