mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 10:45:22 +00:00
lightbar: hide program command over console
This doesn't make any sense to expose to the console, so we can save some logic and string literals by only compiling it for the simulator. BUG=chrome-os-partner:32203 BRANCH=ToT TEST=Checked console does not support command. ectool still works and the lightbar simulator still has the command. Change-Id: Ib216c7c11fd3d0d2d444ef7fc0dda4e451103219 Signed-off-by: Eric Caruso <ejcaruso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/220834 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
786a45347d
commit
d3ebcb18ca
@@ -1539,7 +1539,9 @@ static int help(const char *cmd)
|
||||
ccprintf(" %s LED - get current LED color\n", cmd);
|
||||
ccprintf(" %s demo [0|1] - turn demo mode on & off\n", cmd);
|
||||
ccprintf(" %s params - show current params\n", cmd);
|
||||
#ifdef LIGHTBAR_SIMULATION
|
||||
ccprintf(" %s program filename - load lightbyte program\n", cmd);
|
||||
#endif
|
||||
ccprintf(" %s version - show current version\n", cmd);
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
@@ -1711,14 +1713,11 @@ static int command_lightbar(int argc, char **argv)
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
|
||||
if (argc >= 3 && !strcasecmp(argv[1], "program")) {
|
||||
#ifdef LIGHTBAR_SIMULATION
|
||||
if (argc >= 3 && !strcasecmp(argv[1], "program")) {
|
||||
return lb_load_program(argv[2], &next_prog);
|
||||
#else
|
||||
ccprintf("can't load program from console\n");
|
||||
return EC_ERROR_INVAL;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
if (argc == 4) {
|
||||
struct ec_params_lightbar in;
|
||||
|
||||
Reference in New Issue
Block a user