hal: Branch 'master'
Danny Kukawka
dkukawka at kemper.freedesktop.org
Tue Jan 29 08:37:51 PST 2008
hald/linux/device.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
New commits:
commit 228d76b1d2f01d4801087e060697c25ab11ead79
Author: Danny Kukawka <danny.kukawka at web.de>
Date: Tue Jan 29 17:36:53 2008 +0100
fixed refresh_battery_slow() for power_supply batteries
Fixed refresh_battery_slow() for power_supply batteries: removed not
needed variable 'technology', set the model_name correctly to
info.product and set also battery.model property.
diff --git a/hald/linux/device.c b/hald/linux/device.c
index cc153d5..3c5a136 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -3172,7 +3172,6 @@ refresh_battery_fast (HalDevice *d)
static void
refresh_battery_slow (HalDevice *d)
{
- const char *technology;
char *technology_raw;
char *model_name;
char *manufacturer;
@@ -3187,13 +3186,12 @@ refresh_battery_slow (HalDevice *d)
if (technology_raw != NULL) {
hal_device_property_set_string (d, "battery.reporting.technology", technology_raw);
}
- /* we set this, even if it's unknown */
- technology = util_get_battery_technology (technology_raw);
- hal_device_property_set_string (d, "battery.technology", technology);
+ hal_device_property_set_string (d, "battery.technology", util_get_battery_technology (technology_raw));
/* get product name */
- model_name = hal_util_get_string_from_file (path, "technology");
+ model_name = hal_util_get_string_from_file (path, "model_name");
if (model_name != NULL) {
+ hal_device_property_set_string (d, "battery.model", model_name);
hal_device_property_set_string (d, "info.product", model_name);
} else {
hal_device_property_set_string (d, "info.product", "Generic Battery Device");
More information about the hal-commit
mailing list