diff options
author | Jagadish Krishnamoorthy <jagadish.krishnamoorthy@intel.com> | 2017-09-26 12:18:00 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-27 19:03:03 -0700 |
commit | 49958cf5c229c2719304eef1fc8c0c40e8620ac4 (patch) | |
tree | ff2aaf4baa30401c12083e114c33cea185de1189 /common/vboot_hash.c | |
parent | 8a451f50ef0576553aa7ce17ff625efde6d396ec (diff) | |
download | chrome-ec-49958cf5c229c2719304eef1fc8c0c40e8620ac4.tar.gz |
vboot: Modify the parameter offset
For the Host Command vboot hash EC_VBOOT_HASH_GET case,
if the input parameter offset and size is 0 then change
offset to data_offset to obtain the latest hash value.
Else retain the offset to get the hash value at offset.
BUG=b:66957716
BRANCH=NONE
TEST=On Soraka, ectool echash commands
(RO, RW) should result in hash information.
Change-Id: Ife17d35b0dfeecb5ec799c9ed722ae48dbec5b5b
Signed-off-by: Jagadish Krishnamoorthy <jagadish.krishnamoorthy@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/685738
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'common/vboot_hash.c')
-rw-r--r-- | common/vboot_hash.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/common/vboot_hash.c b/common/vboot_hash.c index 21a78aa585..5a3957274f 100644 --- a/common/vboot_hash.c +++ b/common/vboot_hash.c @@ -437,7 +437,11 @@ static int host_command_vboot_hash(struct host_cmd_handler_args *args) switch (p->cmd) { case EC_VBOOT_HASH_GET: - fill_response(r, p->offset); + if (p->offset || p->size) + fill_response(r, p->offset); + else + fill_response(r, data_offset); + args->response_size = sizeof(*r); return EC_RES_SUCCESS; |