[PATCH 2/2] Linux: More explicit warning when no voltage found

Timothée Ravier siosm99 at gmail.com
Sat Aug 24 15:41:42 PDT 2013


Add device full path in warning if retrieving design voltage fails in
up_device_supply_get_design_voltage(). Also helps diagnose bugs
https://bugzilla.redhat.com/show_bug.cgi?id=847874 and
https://bugzilla.redhat.com/show_bug.cgi?id=863524
---
 src/linux/up-device-supply.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/linux/up-device-supply.c b/src/linux/up-device-supply.c
index a29649f..a93d16a 100644
--- a/src/linux/up-device-supply.c
+++ b/src/linux/up-device-supply.c
@@ -414,7 +414,7 @@ up_device_supply_get_design_voltage (const gchar *native_path)
 	}
 
 	/* completely guess, to avoid getting zero values */
-	g_warning ("no voltage values, using 10V as approximation");
+	g_warning ("no voltage values for device %s, using 10V as approximation", native_path);
 	voltage = 10.0f;
 out:
 	g_free (device_type);
-- 
1.8.3.4



More information about the devkit-devel mailing list