+ continue;
+ }
+
+ if (*walk != '=')
+ continue;
+
+ 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);
+ else if (BEGINS_WITH(last, "POWER_SUPPLY_STATUS=Charging"))
+ status = CS_CHARGING;
+ else if (BEGINS_WITH(last, "POWER_SUPPLY_STATUS=Full"))
+ status = CS_FULL;
+ else {
+ /* The only thing left is the full capacity */
+ if (bat->use_last_full) {
+ if (!BEGINS_WITH(last, "POWER_SUPPLY_ENERGY_FULL") &&
+ !BEGINS_WITH(last, "POWER_SUPPLY_CHARGE_FULL"))
+ continue;
+ } else {
+ if (!BEGINS_WITH(last, "POWER_SUPPLY_CHARGE_FULL_DESIGN") &&
+ !BEGINS_WITH(last, "POWER_SUPPLY_ENERGY_FULL_DESIGN"))
+ continue;
+ }
+
+ full_design = atoi(walk+1);
+ }
+ }