hal: Branch 'master' - 3 commits

Danny Kukawka dkukawka at kemper.freedesktop.org
Tue Feb 5 13:38:01 PST 2008


 hald/linux/device.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1bdd2a2da76c61dca3d7efa0a7011686602a509e
Merge: e60d7a0... 7ee0665...
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Tue Feb 5 22:37:54 2008 +0100

    Merge branch 'master' of ssh://dkukawka@git.freedesktop.org/git/hal

commit e60d7a01d54b91764f5fe78a6e628593391a6a44
Author: Thadeu Lima de Souza Cascardo <cascardo at minaslivre.org>
Date:   Tue Feb 5 22:37:18 2008 +0100

    fixed typo in power_supply code
    
    Test for success in reading file, not failure.

diff --git a/hald/linux/device.c b/hald/linux/device.c
index e887c3c..d3dbc36 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -3054,7 +3054,7 @@ refresh_battery_fast (HalDevice *d)
 	}
 
 	/* CURRENT: we prefer the average if it exists, although present is still pretty good */
-	if (!hal_util_get_int_from_file (path, "current_avg", &current, 10)) {
+	if (hal_util_get_int_from_file (path, "current_avg", &current, 10)) {
 		hal_device_property_set_int (d, "battery.reporting.rate", current / 1000);
 	} else if (hal_util_get_int_from_file (path, "current_now", &current, 10)) {
 		hal_device_property_set_int (d, "battery.reporting.rate", current / 1000);
commit f53fa72e79e31ce78c3aa6b64e3f56faafbf4b16
Author: Thadeu Lima de Souza Cascardo <cascardo at minaslivre.org>
Date:   Tue Feb 5 22:35:29 2008 +0100

    fixed a typo in variable name: is_mah -> is_mWh
    
    Fixed a typo in variable name: is_mah -> is_mWh.

diff --git a/hald/linux/device.c b/hald/linux/device.c
index 1211ee2..e887c3c 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -3094,7 +3094,7 @@ refresh_battery_fast (HalDevice *d)
 			is_mah = TRUE;
 			unknown_unit = FALSE;
 		} else if (strcasecmp (reporting_unit, "mwh") == 0) {
-			is_mah = TRUE;
+			is_mwh = TRUE;
 			unknown_unit = FALSE;
 		}
 	}


More information about the hal-commit mailing list