hal/hald/linux common.c,1.14,1.15

Joe Shaw joe at freedesktop.org
Thu Sep 2 14:45:51 PDT 2004


Update of /cvs/hal/hal/hald/linux
In directory gabe:/tmp/cvs-serv12998/hald/linux

Modified Files:
	common.c 
Log Message:
2004-09-02  Joe Shaw  <joeshaw at novell.com>

	* hald/device.c (hal_device_property_get_bool): Aiee!  If the
	property is not found, we want to return FALSE instead of -1.

	* hald/property.c (hal_property_get_bool): Return FALSE if the
	type isn't boolean in the assertion, not -1.

	* hald/linux/common.c (rename_and_merge): Fix some broken logic
	which only worked because it was depending on -1 being returned
	from boolean functions.  If I understand its original intent
	correctly, it should still work.  (Of course, info.not_available
	is never set to TRUE programmatically, so unless it's set in FDI
	files it never actually comes up)

Index: common.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/common.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- common.c	1 Sep 2004 17:38:58 -0000	1.14
+++ common.c	2 Sep 2004 21:45:49 -0000	1.15
@@ -509,11 +509,8 @@
 
 	if (computed_d != NULL) {
 
-		if ((!hal_device_has_property
-		     (computed_d, "info.not_available"))
-		    &&
-		    (!hal_device_property_get_bool
-		     (computed_d, "info.not_available"))) {
+		if (hal_device_property_get_bool (computed_d,
+						  "info.not_available")) {
 			/* Danger, Will Robinson! Danger!
 			 *
 			 * Ok, this means that either




More information about the hal-commit mailing list