See attached patch - basically if the kbd backlight is zero at startup
upower will currently fail to detect it since it sees a value of 0 as
an error - instead don't bother to check for error since
g_ascii_strtoll returns 0 as both error and a valid conversion of 0.
From 8fa63a8035133585233d45f0cffe687b0e746ba0 Mon Sep 17 00:00:00 2001
From: Alex Murray <[email protected]>
Date: Mon, 18 Oct 2010 19:27:57 +1030
Subject: [PATCH] Keyboard backlight of zero is not an error
Fixes a fail to detect keyboard backlight when initial value is zero
---
src/up-kbd-backlight.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/src/up-kbd-backlight.c b/src/up-kbd-backlight.c
index 249b93d..3e5a03b 100644
--- a/src/up-kbd-backlight.c
+++ b/src/up-kbd-backlight.c
@@ -235,10 +235,6 @@ up_kbd_backlight_find (UpKbdBacklight *kbd_backlight)
goto out;
}
kbd_backlight->priv->brightness = g_ascii_strtoull (buf_now, NULL, 10);
- if (kbd_backlight->priv->brightness <= 0) {
- egg_warning ("failed to convert brightness: %s", buf_now);
- goto out;
- }
/* open the file for writing */
kbd_backlight->priv->fd = open (path_now, O_RDWR);
--
1.7.1
_______________________________________________
devkit-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/devkit-devel