summaryrefslogtreecommitdiff
path: root/util/ectool.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/ectool.c')
-rw-r--r--util/ectool.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/util/ectool.c b/util/ectool.c
index a85166ebe7..4200f3f143 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -9389,7 +9389,7 @@ int cmd_pchg(int argc, char *argv[])
struct ec_response_pchg *r = ec_inbuf;
p->port = port;
- rv = ec_command(EC_CMD_PCHG, 0, ec_outbuf, sizeof(*p),
+ rv = ec_command(EC_CMD_PCHG, 1, ec_outbuf, sizeof(*p),
ec_inbuf, ec_max_insize);
if (rv < 0) {
fprintf(stderr, "Error code: %d\n", rv);
@@ -9400,8 +9400,10 @@ int cmd_pchg(int argc, char *argv[])
r->state < sizeof(pchg_state_text) ?
pchg_state_text[r->state] : "UNDEF",
r->state);
- printf("Battery: %d%%\n", r->battery_percentage);
- printf("Flags: 0x%x\n", r->error);
+ printf("Battery: %u%%\n", r->battery_percentage);
+ printf("Errors: 0x%x\n", r->error);
+ printf("FW Version: 0x%x\n", r->fw_version);
+ printf("Dropped events: %u\n", r->dropped_event_count);
return 0;
}