diff options
author | Namyoon Woo <namyoon@chromium.org> | 2018-11-16 08:55:26 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-19 19:13:58 -0800 |
commit | a253f5c60a32f7a82d57a1ed07983925e1e2c8bc (patch) | |
tree | 794c7685995e159872748f7f351501ba90fffc22 /extra | |
parent | 60889b39721498a234cf54bb592e15ce6f59beaf (diff) | |
download | chrome-ec-a253f5c60a32f7a82d57a1ed07983925e1e2c8bc.tar.gz |
gsctool: fix in setting '--tpm_mode'.
b:119626285 reported the problem with '--tpm_mode'.
$ gsctool -a --tpm_mode
Unrecognized option: -m
$ gsctool -a --tpm_mode enable
TPM Mode: enabled (0)
$ gsctool -a --tpm_mode disable
TPM Mode: enabled (0)
"tpm_mode" long opt should have 'has_arg' set to 'optional_argumenet',
not 'required_argument'.
Before this CL, --tpm_mode worked in a wrong way as reported in
BRANCH=none
BUG=b:119626285
TEST=manually and with autotest (crrev.com/c/1340640) as well.
$ gsctool -a --tpm_mode
TPM Mode: enabled (0)
$ gsctool -a --tpm_mode enable
TPM Mode: enabled (1)
$ gsctool -a --tpm_mode disable
TPM Mode: disabled (2)
Change-Id: Ie11852925a21a3a3b8d9dda6092eac5040f1cd5c
Signed-off-by: Namyoon Woo <namyoon@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1340642
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Diffstat (limited to 'extra')
-rw-r--r-- | extra/usb_updater/gsctool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extra/usb_updater/gsctool.c b/extra/usb_updater/gsctool.c index a3731528e6..9e6d44a03f 100644 --- a/extra/usb_updater/gsctool.c +++ b/extra/usb_updater/gsctool.c @@ -235,7 +235,7 @@ static const struct option long_opts[] = { {"post_reset", 0, NULL, 'p'}, {"rma_auth", 2, NULL, 'r'}, {"systemdev", 0, NULL, 's'}, - {"tpm_mode", 1, NULL, 'm'}, + {"tpm_mode", 2, NULL, 'm'}, {"trunks_send", 0, NULL, 't'}, {"verbose", 0, NULL, 'V'}, {"version", 0, NULL, 'v'}, |