[PATCH] lib: fwts_battery: fix incorrect strings for a battery with unit of mWh

Colin Ian King colin.king at canonical.com
Wed May 23 17:19:52 UTC 2012


Although we did discuss this on irc today, I'm still struggling to 
understand why this is required, can explain it a little more for me. 
Thanks Alex.

Colin


On 23/05/12 14:44, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung at canonical.com>
> ---
>   src/lib/src/fwts_battery.c |    4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/lib/src/fwts_battery.c b/src/lib/src/fwts_battery.c
> index 5f21dfa..468c616 100644
> --- a/src/lib/src/fwts_battery.c
> +++ b/src/lib/src/fwts_battery.c
> @@ -45,11 +45,11 @@ static int fwts_battery_get_capacity_sys_fs(fwts_framework *fw,
>   	switch (type) {
>   	case FWTS_BATTERY_DESIGN_CAPACITY:
>   		field_mAh = "POWER_SUPPLY_CHARGE_FULL_DESIGN=";
> -		field_mWh = "ENERGY_SUPPLY_CHARGE_FULL_DESIGN=";
> +		field_mWh = "POWER_SUPPLY_ENERGY_FULL_DESIGN=";
>   		break;
>   	case FWTS_BATTERY_REMAINING_CAPACITY:
>   		field_mAh = "POWER_SUPPLY_CHARGE_NOW=";
> -		field_mWh = "ENERGY_SUPPLY_CHARGE_NOW=";
> +		field_mWh = "POWER_SUPPLY_ENERGY_NOW=";
>   		break;
>   	default:
>   		return FWTS_ERROR;
>






More information about the fwts-devel mailing list