diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2018-04-30 17:12:28 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-22 07:30:37 +0000 |
commit | 3c35e213f9dca1575daff6b468cfa3eb494ec6e2 (patch) | |
tree | d08019e9442a3c1e7dc3b2763c06900be4ab8017 | |
parent | 8d395916d65eba3f0bcb280019f42ef11f6ec689 (diff) | |
download | chrome-ec-3c35e213f9dca1575daff6b468cfa3eb494ec6e2.tar.gz |
gsctool: add verbose mode command line option
The new command line option is not used yet, it allows to set a flag
which would allow control verbose debug output in the future.
BRANCH=none
BUG=none
TEST=verified that -V command line option shows up in --help output
and is accepted.
Change-Id: Ie7becdb9c6964f7bb75e9917a02594d50c3c2693
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1036742
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1394409
Reviewed-by: Cheng-Han Yang <chenghan@chromium.org>
Commit-Queue: Cheng-Han Yang <chenghan@chromium.org>
Tested-by: Cheng-Han Yang <chenghan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1928546
-rw-r--r-- | extra/usb_updater/gsctool.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/extra/usb_updater/gsctool.c b/extra/usb_updater/gsctool.c index c9c5439045..2932ab5f56 100644 --- a/extra/usb_updater/gsctool.c +++ b/extra/usb_updater/gsctool.c @@ -193,9 +193,10 @@ struct upgrade_pkt { */ #define MAX_BUF_SIZE 500 +static int verbose_mode; static uint32_t protocol_version; static char *progname; -static char *short_opts = "abcd:fhIikO:oPprstUuv"; +static char *short_opts = "abcd:fhIikO:oPprstUuVv"; static const struct option long_opts[] = { /* name hasarg *flag val */ {"any", 0, NULL, 'a'}, @@ -215,6 +216,7 @@ static const struct option long_opts[] = { {"rma_auth", 2, NULL, 'r'}, {"systemdev", 0, NULL, 's'}, {"trunks_send", 0, NULL, 't'}, + {"verbose", 0, NULL, 'V'}, {"version", 0, NULL, 'v'}, {"upstart", 0, NULL, 'u'}, {}, @@ -536,6 +538,7 @@ static void usage(int errs) " -U,--ccd_unlock Start CCD unlock sequence\n" " -u,--upstart " "Upstart mode (strict header checks)\n" + " -V,--verbose Enable debug messages\n" " -v,--version Report this utility version\n" "\n", progname, VID, PID); @@ -2036,6 +2039,9 @@ int main(int argc, char *argv[]) case 'u': td.upstart_mode = 1; break; + case 'V': + verbose_mode = 1; + break; case 'v': report_version(); /* This will call exit(). */ break; |