summaryrefslogtreecommitdiff
path: root/common/host_command.c
diff options
context:
space:
mode:
authorJeff Andersen <jeffandersen@google.com>2017-05-23 17:12:25 -0700
committerchrome-bot <chrome-bot@chromium.org>2017-05-25 04:27:41 -0700
commitcf81f80c4f1fe9294848d56c75e68699e85d8e03 (patch)
tree0d459169860b2e0a3eff13b5147cecda16388e54 /common/host_command.c
parent4fd6f23101d1f7aed89568e5f4cacb99b5ae4710 (diff)
downloadchrome-ec-cf81f80c4f1fe9294848d56c75e68699e85d8e03.tar.gz
Enable two-byte responses from host command handlers.
Previously, result codes were being stored as `enum ec_status` values. The compiler was forcing this value to only be one byte large, since that's all that was necessary to represent all the values of that enum. This change fixes this bug by switching result code variable types from `enum ec_status` to `uint16_t`. BRANCH=none BUG=none TEST=make buildall -j Change-Id: Iacdca51dc6c1de677d2fbb59ad6dd2572d21ea7f Reviewed-on: https://chromium-review.googlesource.com/513609 Commit-Ready: Jeff Andersen <jeffandersen@google.com> Tested-by: Jeff Andersen <jeffandersen@google.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'common/host_command.c')
-rw-r--r--common/host_command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/host_command.c b/common/host_command.c
index e82887738e..3578efc36f 100644
--- a/common/host_command.c
+++ b/common/host_command.c
@@ -599,7 +599,7 @@ static void host_command_debug_request(struct host_cmd_handler_args *args)
CPRINTS("HC 0x%02x", args->command);
}
-enum ec_status host_command_process(struct host_cmd_handler_args *args)
+uint16_t host_command_process(struct host_cmd_handler_args *args)
{
const struct host_command *cmd;
int rv;
@@ -854,7 +854,7 @@ static int command_host_command(int argc, char **argv)
{
struct host_cmd_handler_args args;
char *cmd_params;
- enum ec_status res;
+ uint16_t res;
char *e;
int rv;