summaryrefslogtreecommitdiff
path: root/futility
diff options
context:
space:
mode:
authorPrathmesh Prabhu <pprabhu@chromium.org>2015-03-12 03:15:25 +0000
committerPrathmesh Prabhu <pprabhu@chromium.org>2015-03-12 03:16:00 +0000
commitd90b07bd4daa0c1cff7d78b733ef2bb759cc6e5a (patch)
tree33dacefd33271d0cb35a7f39d298e486c5387ce5 /futility
parent1ab2c10e8cc51a66272458117e35619d87f53db0 (diff)
downloadvboot-d90b07bd4daa0c1cff7d78b733ef2bb759cc6e5a.tar.gz
Revert "futility: Make --debug a global option"
This reverts commit d7e1e4f0befdda52ad48e5a8eb5fc49dbee40247. BUG=chromium:466433 TEST=None. Change-Id: Ia1b300e2dbccddbbae9e831709bc49eb53a5feb8 Reviewed-on: https://chromium-review.googlesource.com/259365 Reviewed-by: David James <davidjames@chromium.org> Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Diffstat (limited to 'futility')
-rw-r--r--futility/cmd_show.c1
-rw-r--r--futility/cmd_sign.c1
-rw-r--r--futility/cmd_vbutil_kernel.c1
-rw-r--r--futility/futility.c11
-rw-r--r--futility/misc.c3
5 files changed, 9 insertions, 8 deletions
diff --git a/futility/cmd_show.c b/futility/cmd_show.c
index aa0ac6bc..f4681f37 100644
--- a/futility/cmd_show.c
+++ b/futility/cmd_show.c
@@ -597,6 +597,7 @@ static const struct option long_opts[] = {
{"fv", 1, 0, 'f'},
{"pad", 1, NULL, OPT_PADDING},
{"verify", 0, &option.strict, 1},
+ {"debug", 0, &debugging_enabled, 1},
{NULL, 0, NULL, 0},
};
static char *short_opts = ":f:k:t";
diff --git a/futility/cmd_sign.c b/futility/cmd_sign.c
index 0c428bf9..192305f7 100644
--- a/futility/cmd_sign.c
+++ b/futility/cmd_sign.c
@@ -693,6 +693,7 @@ static const struct option long_opts[] = {
{"pem_algo", 1, NULL, OPT_PEM_ALGO},
{"pem_external", 1, NULL, OPT_PEM_EXTERNAL},
{"vblockonly", 0, &option.vblockonly, 1},
+ {"debug", 0, &debugging_enabled, 1},
{NULL, 0, NULL, 0},
};
static char *short_opts = ":s:b:k:S:B:v:f:d:l:";
diff --git a/futility/cmd_vbutil_kernel.c b/futility/cmd_vbutil_kernel.c
index ab5c8d7f..c7b3c78c 100644
--- a/futility/cmd_vbutil_kernel.c
+++ b/futility/cmd_vbutil_kernel.c
@@ -85,6 +85,7 @@ static const struct option long_opts[] = {
{"vblockonly", 0, 0, OPT_VBLOCKONLY},
{"pad", 1, 0, OPT_PAD},
{"verbose", 0, &opt_verbose, 1},
+ {"debug", 0, &debugging_enabled, 1},
{"vmlinuz-out", 1, 0, OPT_VMLINUZ_OUT},
{"flags", 1, 0, OPT_FLAGS},
{NULL, 0, 0, 0}
diff --git a/futility/futility.c b/futility/futility.c
index e11cbadf..02f61af9 100644
--- a/futility/futility.c
+++ b/futility/futility.c
@@ -176,6 +176,9 @@ 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"
@@ -193,7 +196,6 @@ 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)
@@ -269,7 +271,7 @@ DECLARE_FUTIL_COMMAND(version, do_version, VBOOT_VERSION_ALL,
"Show the futility source revision and build date",
NULL);
-static int run_command(const struct futil_cmd_t *cmd, int argc, char *argv[])
+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")) {
@@ -300,9 +302,8 @@ int main(int argc, char *argv[], char *envp[])
int i, errorcnt = 0;
int vb_ver = VBOOT_VERSION_ALL;
struct option long_opts[] = {
- {"debug", 0, &debugging_enabled, 1},
- {"vb1" , 0, &vb_ver, VBOOT_VERSION_1_0},
- {"vb21", 0, &vb_ver, VBOOT_VERSION_2_1},
+ {"vb1" , 0, &vb_ver, VBOOT_VERSION_1_0},
+ {"vb21", 0, &vb_ver, VBOOT_VERSION_2_1},
{ 0, 0, 0, 0},
};
diff --git a/futility/misc.c b/futility/misc.c
index c01cb97b..3d85f691 100644
--- a/futility/misc.c
+++ b/futility/misc.c
@@ -25,9 +25,6 @@
#include "futility.h"
#include "gbb_header.h"
-/* Default is to support everything we can */
-enum vboot_version vboot_version = VBOOT_VERSION_ALL;
-
int debugging_enabled;
void Debug(const char *format, ...)
{