summaryrefslogtreecommitdiff
path: root/futility/futility.c
diff options
context:
space:
mode:
Diffstat (limited to 'futility/futility.c')
-rw-r--r--futility/futility.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/futility/futility.c b/futility/futility.c
index 02f61af9..e11cbadf 100644
--- a/futility/futility.c
+++ b/futility/futility.c
@@ -176,9 +176,6 @@ static void log_args(int argc, char *argv[])
/******************************************************************************/
-/* Default is to support everything we can */
-enum vboot_version vboot_version = VBOOT_VERSION_ALL;
-
static const char *const usage = "\n"
"Usage: " MYNAME " [options] COMMAND [args...]\n"
"\n"
@@ -196,6 +193,7 @@ static const char *const options =
"\n"
" --vb1 Use only vboot v1.0 binary formats\n"
" --vb21 Use only vboot v2.1 binary formats\n"
+" --debug Be noisy about what's going on\n"
"\n";
static const struct futil_cmd_t *find_command(const char *name)
@@ -271,7 +269,7 @@ DECLARE_FUTIL_COMMAND(version, do_version, VBOOT_VERSION_ALL,
"Show the futility source revision and build date",
NULL);
-int run_command(const struct futil_cmd_t *cmd, int argc, char *argv[])
+static int run_command(const struct futil_cmd_t *cmd, int argc, char *argv[])
{
/* Handle the "CMD --help" case ourselves */
if (2 == argc && 0 == strcmp(argv[1], "--help")) {
@@ -302,8 +300,9 @@ int main(int argc, char *argv[], char *envp[])
int i, errorcnt = 0;
int vb_ver = VBOOT_VERSION_ALL;
struct option long_opts[] = {
- {"vb1" , 0, &vb_ver, VBOOT_VERSION_1_0},
- {"vb21", 0, &vb_ver, VBOOT_VERSION_2_1},
+ {"debug", 0, &debugging_enabled, 1},
+ {"vb1" , 0, &vb_ver, VBOOT_VERSION_1_0},
+ {"vb21", 0, &vb_ver, VBOOT_VERSION_2_1},
{ 0, 0, 0, 0},
};