hal/hald Makefile.am,1.29,1.30 device_info.c,1.10,1.11

David Zeuthen david at freedesktop.org
Sun Aug 15 11:54:59 PDT 2004


Update of /cvs/hal/hal/hald
In directory pdx:/tmp/cvs-serv28976/hald

Modified Files:
	Makefile.am device_info.c 
Log Message:
2004-08-15  David Zeuthen  <david at fubar.dk>

	Sends messages from hotplug and device naming helpers via a local
	socket. Reorder the hotplug events we receive in hald according to
	SEQNUM and use a semaphor pattern to ensure that we don't process
	a hotplug event before the device created in effect to the
	previous event is completely processed (e.g.  add/remove callouts
	have run).

	* hald/Makefile.am: Remove scsi_host_class_device.c and add
	scsi_bus_device.c, hald_helper.h.

	* hald/device_info.c: 
	(handle_match): Comment out debug
	(scan_fdi_files): Comment out debug

	* hald/linux/block_class_device.c: 
	(block_class_visit): Return the HalDevice* object
	(block_class_pre_process): Use 'scsi' instead of 'scsi_device'
	(block_class_compute_udi): -do-
	(mtab_handle_volume): Comment out debug
	(etc_mtab_process_all_block_devices): Comment out debug

	* hald/linux/bus_device.c:
	(bus_device_visit): Return the HalDevice* object

	* hald/linux/bus_device.h: Make the visit method return the HalDevice
	object for tracking purposes

	* hald/linux/class_device.c: 
	(class_device_visit): Return the HalDevice* object
	(class_device_got_sysdevice): Comment out debug

	* hald/linux/class_device.h: Make the visit method return the HalDevice
	object for tracking purposes

	* hald/linux/common.c:
	(rename_and_merge): Comment out debug
	(class_device_get_device_file): Make debug statement more specific

	* hald/linux/net_class_device.c:
	(net_class_compute_udi): Comment out debug
	(net_class_udev_event): New function to ignore the udev event (duh)

	* hald/linux/osspec.c: Remove the ClassDeviceHandler scsi_device_
	class_device in favour of the BusDeviceHandler scsi_bus_device
	(visit_class_device): Return the HalDevice* object
	(visit_device): Return the HalDevice* object
	(osspec_init): Listen for datagrams on a local socket from hal.dev
	and hal.hotplug
	(remove_device): Return the HalDevice* object
	(remove_class_device): Return the HalDevice* object
	(handle_hotplug): Removed
	(handle_device_event): Removed
	(osspec_filter_function): Is empty now. We got our information via
	a local socket now
	(reenable_hotplug_proc): New function
	(hald_helper_hotplug): New function
	(hald_helper_device_node): New function
	(hald_helper_hotplug_process_queue): New function
	(hotplug_sem_up): New function 
	(hotplug_sem_down): New function
	(hald_helper_first_hotplug_event): New function
	(hald_helper_data): New function

	* hald/linux/hald_helper.h: New file
	
	* hald/linux/scsi_bus_device.c: New file

	* hald/linux/scsi_device_class_device.c: Removed

	* hald/linux/scsi_generic_class_device.c:
	(scsi_generic_get_device_file_target): New function. Merge the
	device file information to scsi.generic_device instead

	* tools/device-manager/Const.py.in: s/scsi_device/scsi/

	* tools/linux/Makefile.am: Don't link with D-BUS

	* tools/linux/hal_dev.c:
	(get_sysfs_mnt_path): Removed
	(main): Send the message via a local socket instead

	* tools/linux/hal_hotplug.c:
	(main): Send the message via a local socket instead



Index: Makefile.am
===================================================================
RCS file: /cvs/hal/hal/hald/Makefile.am,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- Makefile.am	1 Aug 2004 19:13:55 -0000	1.29
+++ Makefile.am	15 Aug 2004 18:54:56 -0000	1.30
@@ -40,9 +40,9 @@
 					linux/input_class_device.c	\
 					linux/net_class_device.c	\
 					linux/printer_class_device.c	\
+	                                linux/scsi_bus_device.c           \
 					linux/scsi_generic_class_device.c \
 					linux/scsi_host_class_device.c	\
-					linux/scsi_device_class_device.c \
 					linux/block_class_device.c	\
 					linux/ide_host_bus_device.c	\
 					linux/ide_bus_device.c		\
@@ -52,7 +52,8 @@
 					linux/ieee1394_node_class_device.c \
 					linux/ieee1394_host_class_device.c \
 					linux/platform_bus_device.c	\
-	linux/linux_dvd_rw_utils.h	linux/linux_dvd_rw_utils.c
+	linux/linux_dvd_rw_utils.h	linux/linux_dvd_rw_utils.c \
+	linux/hald_helper.h
 
 #					linux/ieee1394_host_class_device.c
 

Index: device_info.c
===================================================================
RCS file: /cvs/hal/hal/hald/device_info.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- device_info.c	21 Jul 2004 17:14:54 -0000	1.10
+++ device_info.c	15 Aug 2004 18:54:56 -0000	1.11
@@ -163,7 +163,7 @@
 			    value) != 0)
 			return FALSE;
 
-		HAL_INFO (("*** string match for key %s", key));
+		/*HAL_INFO (("*** string match for key %s", key));*/
 		return TRUE;
 	} else if (strcmp (attr[2], "int") == 0) {
 		dbus_int32_t value;
@@ -173,8 +173,8 @@
 		
 		/** @todo Check error condition */
 
-		HAL_INFO (("Checking that key='%s' is a int that equals %d", 
-			   key, value));
+		/*HAL_INFO (("Checking that key='%s' is a int that equals %d", 
+		  key, value));*/
 
 		if (hal_device_property_get_type (pc->device, key) != DBUS_TYPE_INT32)
 			return FALSE;
@@ -196,8 +196,8 @@
 		else
 			return FALSE;
 
-		HAL_INFO (("Checking that key='%s' is a bool that equals %s", 
-			   key, value ? "TRUE" : "FALSE"));
+		/*HAL_INFO (("Checking that key='%s' is a bool that equals %s", 
+		  key, value ? "TRUE" : "FALSE"));*/
 
 		if (hal_device_property_get_type (pc->device, key) != 
 		    DBUS_TYPE_BOOLEAN)
@@ -206,7 +206,7 @@
 		if (hal_device_property_get_bool (pc->device, key) != value)
 			return FALSE;
 
-		HAL_INFO (("*** bool match for key %s", key));
+		/*HAL_INFO (("*** bool match for key %s", key));*/
 		return TRUE;
 	}
 
@@ -627,8 +627,8 @@
 				found_fdi_file =
 				    process_fdi_file (dir, filename, d);
 				if (found_fdi_file) {
-					HAL_INFO (("*** Matched file %s/%s", 
-						   dir, filename));
+					/*HAL_INFO (("*** Matched file %s/%s", 
+					  dir, filename));*/
 					break;
 				}
 			}




More information about the hal-commit mailing list