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

Colin Ian King colin.king at canonical.com
Fri May 25 08:30:04 UTC 2012


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;
>
I can't fully recall why I had this set this way, I think I wrote this 
on a plane and I may have easily made a mistake, so I'm very much 
inclined to go with Alex's changes and if we have evidence later on that 
this needs more attention then we will need to re-visit this. But for 
now, lets go with this.  Thanks Alex for spotting this issue.

Acked-by: Colin Ian King <colin.king at canonical.com>





More information about the fwts-devel mailing list