diff options
author | Michael Stapelberg <michael+x200@stapelberg.de> | 2008-10-24 23:45:45 +0200 |
---|---|---|
committer | Michael Stapelberg <michael+x200@stapelberg.de> | 2008-10-24 23:45:45 +0200 |
commit | 554a984fe6b8f29059cfa304778a465dce46c9d3 (patch) | |
tree | 75858c8c04a271676df26058e8304aec14d9e6ad /wmiistatus.c | |
parent | fe75f783ed8cc34d8219f9f59c30bbba2dc86738 (diff) |
Add support for differently named uevent data and hint for 9pnet_fd
Diffstat (limited to 'wmiistatus.c')
-rw-r--r-- | wmiistatus.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/wmiistatus.c b/wmiistatus.c index e99625a..ffa86e3 100644 --- a/wmiistatus.c +++ b/wmiistatus.c @@ -189,9 +189,11 @@ static char *get_battery_info() { (void)read(fd, buf, sizeof(buf)); for (walk = buf, last = buf; (walk-buf) < 1024; walk++) if (*walk == '=') { - if (BEGINS_WITH(last, "POWER_SUPPLY_ENERGY_FULL_DESIGN")) + if (BEGINS_WITH(last, "POWER_SUPPLY_ENERGY_FULL_DESIGN") || + BEGINS_WITH(last, "POWER_SUPPLY_CHARGE_FULL_DESIGN")) full_design = atoi(walk+1); - else if (BEGINS_WITH(last, "POWER_SUPPLY_ENERGY_NOW")) + else if (BEGINS_WITH(last, "POWER_SUPPLY_ENERGY_NOW") || + BEGINS_WITH(last, "POWER_SUPPLY_CHARGE_NOW")) remaining = atoi(walk+1); else if (BEGINS_WITH(last, "POWER_SUPPLY_CURRENT_NOW")) present_rate = atoi(walk+1); |