X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=osd-batt.c;h=33ec7216fb403bb5e5b5b9a0d1c40abfe4db4352;hb=e86321d03eb795669378283dd15e9b5514d5760b;hp=86ec6d38f30dc65ff0fba4272d2eb83c1f1dcc1b;hpb=3ea5c97c3503076b1100b4fdcf64f6549c3b9e63;p=osdd.git diff --git a/osd-batt.c b/osd-batt.c index 86ec6d3..33ec721 100644 --- a/osd-batt.c +++ b/osd-batt.c @@ -94,7 +94,8 @@ static void parse_batt(char *batt_name) if (!sys_read_int("present", 1)) return; - int charging = sys_read_int("charging", 0); + char status[BUFSIZE]; + int charging = sys_read(status, "status") && !strcmp(status, "Charging"); int charge_full = sys_read_int("charge_full", 0); int charge_now = sys_read_int("charge_now", 0); int current_now = sys_read_int("current_now", 0);