diff options
author | Vic Yang <victoryang@chromium.org> | 2012-05-25 14:30:37 +0800 |
---|---|---|
committer | Vic Yang <victoryang@chromium.org> | 2012-05-26 20:29:54 +0800 |
commit | b85a7ce9d686799e88bf65fa95ed49c6d561d621 (patch) | |
tree | 07c839b63d24bc123ad6bf20b6c7031f5990055e /util | |
parent | 7ecd1d6d3c23b6acb13f90062d062647ddb4fed3 (diff) | |
download | chrome-ec-b85a7ce9d686799e88bf65fa95ed49c6d561d621.tar.gz |
Make ectool correctly report when keyboard backlight is off
When keyboard backlight is disabled, make 'ectool pwmgetkblight' reports
'disabled'.
BUG=chrome-os-partner:9966
TEST='ectool pwmgetkblight' shows 'Keyboard backlight disabled' when
lid closed.
Change-Id: Ica690159e30431ccb530275fcc2311fb8f54a9aa
Diffstat (limited to 'util')
-rw-r--r-- | util/ectool.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/ectool.c b/util/ectool.c index a129791ca0..4c9ff31bb5 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -749,7 +749,10 @@ int cmd_pwm_get_keyboard_backlight(int argc, char *argv[]) if (rv) return rv; - printf("Current keyboard backlight percent: %d\n", r.percent); + if (r.enabled == 1) + printf("Current keyboard backlight percent: %d\n", r.percent); + else + printf("Keyboard backlight disabled.\n"); return 0; } |