hal: Branch 'master'

Danny Kukawka dkukawka at kemper.freedesktop.org
Mon Aug 6 06:57:48 PDT 2007


 hald/linux/addons/addon-dell-backlight.cpp |    5 +++++
 1 files changed, 5 insertions(+)

New commits:
diff-tree 32975e1254efb7f21a1f011e5ec142706b38585e (from 89b8830183dfd5755133b9fabccb37ecbc29d979)
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Mon Aug 6 15:57:49 2007 +0200

    stop hald-addon-dell-backlight if needed kernel module isni't loaded
    
    Currently the hald-addon-dell-backlight is running also if the
    needed dcdbas kernel module is not loaded. In this case it provide
    the brightness interface with only one brightness level, which is
    useless.
    
    Simply exit the addon if the kernel module is missing to prevent
    to have a useless interface for brightness.

diff --git a/hald/linux/addons/addon-dell-backlight.cpp b/hald/linux/addons/addon-dell-backlight.cpp
index 3459c0d..3116dfa 100644
--- a/hald/linux/addons/addon-dell-backlight.cpp
+++ b/hald/linux/addons/addon-dell-backlight.cpp
@@ -288,6 +288,11 @@ main (int argc, char *argv[])
 	dbus_connection_add_filter (conn, filter_function, NULL, NULL);
 
 	read_backlight (TRUE); /* Fill min- & maxValue with the correct values */
+
+	if (maxValue == 0) {
+		HAL_ERROR (("This machine don't support set brightness."));
+		return -5;
+	}
 	
 	if (!libhal_device_set_property_int (halctx, 
 					    "/org/freedesktop/Hal/devices/dell_lcd_panel",


More information about the hal-commit mailing list