diff options
author | Eric Caruso <ejcaruso@chromium.org> | 2014-10-08 16:39:51 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-09 23:29:42 +0000 |
commit | 6713fa2d38a3b455be18ca1d8e1b530809f43352 (patch) | |
tree | bc69469f0f0188d23015c8b842013371deb40525 /extra | |
parent | e3e799916460fc2faf3c661534de014d692e7f19 (diff) | |
download | chrome-ec-6713fa2d38a3b455be18ca1d8e1b530809f43352.tar.gz |
lightbar: Rename structs and macros for kernel cros_ec_commands
This prepends EC_ a macro exposed in ec_commands.h, moves a
macro into lbcc that is not used elsewhere, and changes lb_program
structs to lightbar_program.
BUG=None
BRANCH=ToT
TEST=make buildall -j
Change-Id: I481562da72d91f846c64cf9af40338027641462c
Signed-off-by: Eric Caruso <ejcaruso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222406
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'extra')
-rw-r--r-- | extra/lightbar/main.c | 8 | ||||
-rw-r--r-- | extra/lightbar/simulation.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/extra/lightbar/main.c b/extra/lightbar/main.c index 6014719f0b..a0da1a28ba 100644 --- a/extra/lightbar/main.c +++ b/extra/lightbar/main.c @@ -291,7 +291,7 @@ done: return r; } -int lb_load_program(const char *filename, struct lb_program *prog) +int lb_load_program(const char *filename, struct lightbar_program *prog) { FILE *fp; size_t got; @@ -312,15 +312,15 @@ int lb_load_program(const char *filename, struct lb_program *prog) return 1; } rc = (int) ftell(fp); - if (rc > LB_PROG_LEN) { + if (rc > EC_LB_PROG_LEN) { fprintf(stderr, "File %s is too long, aborting\n", filename); fclose(fp); return 1; } rewind(fp); - memset(prog->data, 0, LB_PROG_LEN); - got = fread(prog->data, 1, LB_PROG_LEN, fp); + memset(prog->data, 0, EC_LB_PROG_LEN); + got = fread(prog->data, 1, EC_LB_PROG_LEN, fp); if (rc != got) fprintf(stderr, "Warning: did not read entire file\n"); prog->size = got; diff --git a/extra/lightbar/simulation.h b/extra/lightbar/simulation.h index 2abfae230b..f7a30ea6a7 100644 --- a/extra/lightbar/simulation.h +++ b/extra/lightbar/simulation.h @@ -23,7 +23,7 @@ void *entry_lightbar(void *); void init_windows(void); int lb_read_params_from_file(const char *filename, struct lightbar_params_v1 *p); -int lb_load_program(const char *filename, struct lb_program *prog); +int lb_load_program(const char *filename, struct lightbar_program *prog); /* Interfaces to the EC code that we're encapsulating */ void lightbar_task(void); int fake_consolecmd_lightbar(int argc, char *argv[]); |