hal/hald/linux block_class_device.c, 1.17, 1.18 bus_device.h, 1.4, 1.5 class_device.h, 1.6, 1.7 ide_bus_device.c, 1.4, 1.5 ide_host_bus_device.c, 1.5, 1.6 input_class_device.c, 1.6, 1.7 macio_bus_device.c, 1.1, 1.2 net_class_device.c, 1.3, 1.4 osspec.c, 1.17, 1.18 pci_bus_device.c, 1.5, 1.6 pcmcia_socket_class_device.c, 1.1, 1.2 printer_class_device.c, 1.6, 1.7 scsi_device_class_device.c, 1.6, 1.7 scsi_generic_class_device.c, 1.1, 1.2 scsi_host_class_device.c, 1.6, 1.7 usb_bus_device.c, 1.9, 1.10 usbif_bus_device.c, 1.6, 1.7

Joe Shaw joe at pdx.freedesktop.org
Fri Apr 30 13:59:10 PDT 2004


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

Modified Files:
	block_class_device.c bus_device.h class_device.h 
	ide_bus_device.c ide_host_bus_device.c input_class_device.c 
	macio_bus_device.c net_class_device.c osspec.c 
	pci_bus_device.c pcmcia_socket_class_device.c 
	printer_class_device.c scsi_device_class_device.c 
	scsi_generic_class_device.c scsi_host_class_device.c 
	usb_bus_device.c usbif_bus_device.c 
Log Message:
2004-04-30  Joe Shaw  <joe at ximian.com>

	* hald/linux/block_class_device.c (block_class_pre_process):
	Process the mtab here, so that our fstype and mount_point
	properties are set.

	* hald/linux/bus_device.h, hald/linux/class_device.h: Remove the
	detection_done function.  It's not really useful with all the
	asynchronicity.
	
	* hald/linux/*_bus_device.c, hald/linux/*_class_device.c: Remove
	the detection_done functions.

Index: block_class_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/block_class_device.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- a/block_class_device.c	30 Apr 2004 17:01:23 -0000	1.17
+++ b/block_class_device.c	30 Apr 2004 20:59:08 -0000	1.18
@@ -67,6 +67,8 @@
  * @{
  */
 
+static void etc_mtab_process_all_block_devices (dbus_bool_t force);
+
 typedef struct {
 	HalDevice *device;
 	ClassDeviceHandler *handler;
@@ -964,6 +966,9 @@
 
 	/* check for media on the device */
 	detect_media (d);
+
+	/* Check the mtab to see if the device is mounted */
+	etc_mtab_process_all_block_devices (TRUE);
 }
 
 static char *
@@ -1295,7 +1300,10 @@
 	if (!read_etc_mtab (force))
 		return;
 
-	HAL_INFO (("/etc/mtab changed, processing all block devices"));
+	if (!force)
+		HAL_INFO (("/etc/mtab changed, processing all block devices"));
+	else
+		HAL_INFO (("processing /etc/mtab"));
 
 	hal_device_store_foreach (hald_get_gdl (), foreach_block_device, NULL);
 }
@@ -1368,16 +1376,9 @@
 	/* HAL_INFO (("exiting")); */
 }
 
-static void
-block_class_detection_done (ClassDeviceHandler *self)
-{
-	etc_mtab_process_all_block_devices (TRUE);
-}
-
 /** Method specialisations for block device class */
 ClassDeviceHandler block_class_handler = {
 	class_device_init,                  /**< init function */
-	block_class_detection_done,         /**< detection is done */
 	class_device_shutdown,              /**< shutdown function */
 	block_class_tick,                   /**< timer function */
 	class_device_accept,                /**< accept function */

Index: bus_device.h
===================================================================
RCS file: /cvs/hal/hal/hald/linux/bus_device.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/bus_device.h	25 Apr 2004 17:24:44 -0000	1.4
+++ b/bus_device.h	30 Apr 2004 20:59:08 -0000	1.5
@@ -40,12 +40,6 @@
 	 */
 	void (*init) (BusDeviceHandler *self);
 
-	/** Called when all device detection (on bootstrap) is done 
-	 *
-	 *  @param  self        Pointer to class members
-	 */
-	void (*detection_done) (BusDeviceHandler *self);
-
 	/** Called just before the HAL daemon is shutting down 
 	 *
 	 *  @param  self        Pointer to class members
@@ -161,8 +155,6 @@
 void bus_device_visit (BusDeviceHandler *self, const char *path, 
 		       struct sysfs_device *device);
 
-void bus_device_detection_done (BusDeviceHandler *self);
-
 void bus_device_init (BusDeviceHandler *self);
 
 void bus_device_shutdown (BusDeviceHandler *self);

Index: class_device.h
===================================================================
RCS file: /cvs/hal/hal/hald/linux/class_device.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- a/class_device.h	25 Apr 2004 17:24:44 -0000	1.6
+++ b/class_device.h	30 Apr 2004 20:59:08 -0000	1.7
@@ -40,12 +40,6 @@
 	 */
 	void (*init) (ClassDeviceHandler* self);
 
-	/** Called when all device detection (on bootstrap) is done 
-	 *
-	 *  @param  self        Pointer to class members
-	 */
-	void (*detection_done) (ClassDeviceHandler* self);
-
 	/** Called just before the HAL daemon is shutting down 
 	 *
 	 *  @param  self        Pointer to class members
@@ -249,8 +243,6 @@
 
 void class_device_init (ClassDeviceHandler *self);
 
-void class_device_detection_done (ClassDeviceHandler *self);
-
 void class_device_shutdown (ClassDeviceHandler *self);
 
 void class_device_pre_process (ClassDeviceHandler *self,

Index: ide_bus_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/ide_bus_device.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/ide_bus_device.c	12 Apr 2004 20:11:51 -0000	1.4
+++ b/ide_bus_device.c	30 Apr 2004 20:59:08 -0000	1.5
@@ -94,7 +94,6 @@
 /** Method specialisations for bustype pci */
 BusDeviceHandler ide_bus_handler = {
 	bus_device_init,           /**< init function */
-	bus_device_detection_done, /**< detection is done */
 	bus_device_shutdown,       /**< shutdown function */
 	bus_device_tick,           /**< timer function */
 	bus_device_accept,         /**< accept function */

Index: ide_host_bus_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/ide_host_bus_device.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- a/ide_host_bus_device.c	25 Apr 2004 17:24:44 -0000	1.5
+++ b/ide_host_bus_device.c	30 Apr 2004 20:59:08 -0000	1.6
@@ -100,7 +100,6 @@
 /** Method specialisations for bustype pci */
 BusDeviceHandler ide_host_bus_handler = {
 	bus_device_init,             /**< init function */
-	bus_device_detection_done,   /**< detection is done */
 	bus_device_shutdown,         /**< shutdown function */
 	bus_device_tick,             /**< timer function */
 	ide_host_device_accept,      /**< accept function */

Index: input_class_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/input_class_device.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- a/input_class_device.c	12 Apr 2004 20:11:51 -0000	1.6
+++ b/input_class_device.c	30 Apr 2004 20:59:08 -0000	1.7
@@ -125,7 +125,6 @@
 /** Method specialisations for input device class */
 ClassDeviceHandler input_class_handler = {
 	class_device_init,                  /**< init function */
-	class_device_detection_done,        /**< detection is done */
 	class_device_shutdown,              /**< shutdown function */
 	class_device_tick,                  /**< timer function */
 	class_device_accept,                /**< accept function */

Index: macio_bus_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/macio_bus_device.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- a/macio_bus_device.c	26 Apr 2004 16:52:54 -0000	1.1
+++ b/macio_bus_device.c	30 Apr 2004 20:59:08 -0000	1.2
@@ -79,7 +79,6 @@
 /** Method specialisations for bustype pci */
 BusDeviceHandler macio_bus_handler = {
 	bus_device_init,           /**< init function */
-	bus_device_detection_done, /**< detection is done */
 	bus_device_shutdown,       /**< shutdown function */
 	bus_device_tick,           /**< timer function */
 	bus_device_accept,         /**< accept function */

Index: net_class_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/net_class_device.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- a/net_class_device.c	25 Apr 2004 17:24:44 -0000	1.3
+++ b/net_class_device.c	30 Apr 2004 20:59:08 -0000	1.4
@@ -481,7 +481,6 @@
 /** Method specialisations for input device class */
 ClassDeviceHandler net_class_handler = {
 	class_device_init,                  /**< init function */
-	class_device_detection_done,        /**< detection is done */
 	class_device_shutdown,              /**< shutdown function */
 	class_device_tick,                  /**< timer function */
 	class_device_accept,                /**< accept function */

Index: osspec.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/osspec.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- a/osspec.c	27 Apr 2004 19:05:26 -0000	1.17
+++ b/osspec.c	30 Apr 2004 20:59:08 -0000	1.18
@@ -42,6 +42,7 @@
 #include "../osspec.h"
 #include "../logger.h"
 #include "../hald.h"
+#include "../callout.h"
 
 #include "common.h"
 #include "bus_device.h"
@@ -414,19 +415,6 @@
 	}
 
 	hald_is_initialising = FALSE;
-
-	/* Notify various device and class types that detection is done, so 
-	 * they can do some (optional) batch processing
-	 */
-	for (i=0; bus_device_handlers[i] != NULL; i++) {
-		BusDeviceHandler *bh = bus_device_handlers[i];
-		bh->detection_done (bh);
-	}
-
-	for (i=0; class_device_handlers[i] != NULL; i++) {
-		ClassDeviceHandler *ch = class_device_handlers[i];
-		ch->detection_done (ch);
-	}
 }
 
 static void

Index: pci_bus_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/pci_bus_device.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- a/pci_bus_device.c	22 Apr 2004 21:52:05 -0000	1.5
+++ b/pci_bus_device.c	30 Apr 2004 20:59:08 -0000	1.6
@@ -482,7 +482,6 @@
 /** Method specialisations for bustype pci */
 BusDeviceHandler pci_bus_handler = {
 	pci_device_init,           /**< init function */
-	bus_device_detection_done, /**< detection is done */
 	pci_device_shutdown,       /**< shutdown function */
 	bus_device_tick,           /**< timer function */
 	bus_device_accept,         /**< accept function */

Index: pcmcia_socket_class_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/pcmcia_socket_class_device.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- a/pcmcia_socket_class_device.c	22 Apr 2004 21:53:17 -0000	1.1
+++ b/pcmcia_socket_class_device.c	30 Apr 2004 20:59:08 -0000	1.2
@@ -79,7 +79,6 @@
 /** Method specialisations for input device class */
 ClassDeviceHandler pcmcia_socket_class_handler = {
 	class_device_init,                  /**< init function */
-	class_device_detection_done,        /**< detection is done */
 	class_device_shutdown,              /**< shutdown function */
 	class_device_tick,                  /**< timer function */
 	class_device_accept,                /**< accept function */

Index: printer_class_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/printer_class_device.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- a/printer_class_device.c	25 Apr 2004 17:24:44 -0000	1.6
+++ b/printer_class_device.c	30 Apr 2004 20:59:08 -0000	1.7
@@ -164,7 +164,6 @@
 /** Method specialisations for input device class */
 ClassDeviceHandler printer_class_handler = {
 	class_device_init,                  /**< init function */
-	class_device_detection_done,        /**< detection is done */
 	class_device_shutdown,              /**< shutdown function */
 	class_device_tick,                  /**< timer function */
 	printer_class_device_accept,        /**< accept function */

Index: scsi_device_class_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/scsi_device_class_device.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- a/scsi_device_class_device.c	12 Apr 2004 20:11:51 -0000	1.6
+++ b/scsi_device_class_device.c	30 Apr 2004 20:59:08 -0000	1.7
@@ -103,7 +103,6 @@
 /** Method specialisations for input device class */
 ClassDeviceHandler scsi_device_class_handler = {
 	class_device_init,                  /**< init function */
-	class_device_detection_done,        /**< detection is done */
 	class_device_shutdown,              /**< shutdown function */
 	class_device_tick,                  /**< timer function */
 	class_device_accept,                /**< accept function */

Index: scsi_generic_class_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/scsi_generic_class_device.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- a/scsi_generic_class_device.c	14 Apr 2004 21:05:08 -0000	1.1
+++ b/scsi_generic_class_device.c	30 Apr 2004 20:59:08 -0000	1.2
@@ -79,7 +79,6 @@
 /** Method specialisations for input device class */
 ClassDeviceHandler scsi_generic_class_handler = {
 	class_device_init,                  /**< init function */
-	class_device_detection_done,        /**< detection is done */
 	class_device_shutdown,              /**< shutdown function */
 	class_device_tick,                  /**< timer function */
 	class_device_accept,                /**< accept function */

Index: scsi_host_class_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/scsi_host_class_device.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- a/scsi_host_class_device.c	12 Apr 2004 20:11:51 -0000	1.6
+++ b/scsi_host_class_device.c	30 Apr 2004 20:59:08 -0000	1.7
@@ -92,7 +92,6 @@
 /** Method specialisations for input device class */
 ClassDeviceHandler scsi_host_class_handler = {
 	class_device_init,                  /**< init function */
-	class_device_detection_done,        /**< detection is done */
 	class_device_shutdown,              /**< shutdown function */
 	class_device_tick,                  /**< timer function */
 	class_device_accept,                /**< accept function */

Index: usb_bus_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/usb_bus_device.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- a/usb_bus_device.c	25 Apr 2004 17:24:44 -0000	1.9
+++ b/usb_bus_device.c	30 Apr 2004 20:59:08 -0000	1.10
@@ -940,7 +940,6 @@
 /** Method specialisations for bustype usb */
 BusDeviceHandler usb_bus_handler = {
 	usb_device_init,           /**< init function */
-	bus_device_detection_done, /**< detection is done */
 	usb_device_shutdown,       /**< shutdown function */
 	bus_device_tick,           /**< timer function */
 	usb_device_accept,         /**< accept function */

Index: usbif_bus_device.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/usbif_bus_device.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- a/usbif_bus_device.c	25 Apr 2004 17:24:44 -0000	1.6
+++ b/usbif_bus_device.c	30 Apr 2004 20:59:08 -0000	1.7
@@ -149,7 +149,6 @@
 /** Method specialisations for bustype usbif */
 BusDeviceHandler usbif_bus_handler = {
 	bus_device_init,           /**< init function */
-	bus_device_detection_done, /**< detection is done */
 	bus_device_shutdown,       /**< shutdown function */
 	bus_device_tick,           /**< timer function */
 	usbif_device_accept,       /**< accept function */





More information about the hal-commit mailing list