hal: Branch 'master' - 3 commits

Danny Kukawka dkukawka at kemper.freedesktop.org
Tue Oct 28 14:57:21 PDT 2008


 doc/spec/hal-spec-properties.xml |   77 ---------------------------------------
 hald/linux/blockdev.c            |   30 ---------------
 hald/linux/device.c              |   60 ------------------------------
 3 files changed, 1 insertion(+), 166 deletions(-)

New commits:
commit ae92796e39b5663b55cb262f3cfc83caa68b1510
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Tue Oct 28 22:57:00 2008 +0100

    Revert "add support for bdi bases block devices"
    
    This reverts commit 52390cd9e5f1ce48eb9b486044369f0e10a7865b.

diff --git a/hald/linux/blockdev.c b/hald/linux/blockdev.c
index 86a72e3..ab42341 100644
--- a/hald/linux/blockdev.c
+++ b/hald/linux/blockdev.c
@@ -966,32 +966,6 @@ hotplug_event_begin_add_blockdev (const gchar *sysfs_path, const gchar *device_f
 
 	}
 
-	/* handle virtual block devices */
-	if (parent == NULL && !is_fakevolume && !hotplug_event->reposted && (strstr(sysfs_path, "virtual") != NULL) ) {
-		char *link;
-		char *target;
-
-		HAL_INFO (("Check if this is a BDI based device ..."));
-                link = g_strdup_printf ("%s/bdi", sysfs_path);
-                if (g_file_test (link, G_FILE_TEST_IS_SYMLINK)) {
-                	target = resolve_symlink (link);
-	                if (target != NULL) {
-                		HAL_INFO (("Looks like a BDI based block device. Link->target: '%s' -> '%s'", link, target));
-				/* try to find the parent device to this link */
-				parent = hal_device_store_match_key_value_string (hald_get_gdl(), "linux.sysfs_path", target);
-			}
-			g_free (target);
-                } else {
-			char *parent_path = NULL;
-
-			HAL_INFO (("This wasn't a BDI base device. Check now if it is a slave device ..."));
-
-			parent_path = hal_util_get_parent_path (sysfs_path);
-			if (parent_path) 
-				parent = hal_device_store_match_key_value_string (hald_get_gdl(), "linux.sysfs_path", parent_path);
-		}
-	}
-
 	if (parent == NULL) {
 		HAL_INFO (("Ignoring hotplug event - no parent"));
 		goto error;
@@ -1219,10 +1193,6 @@ hotplug_event_begin_add_blockdev (const gchar *sysfs_path, const gchar *device_f
 					physdev = d_it;
 					physdev_udi = udi_it;
 					hal_device_property_set_string (d, "storage.bus", "pci");
-				} else if (strcmp (bus, "bdi") == 0) {
-					physdev = d_it;
-					physdev_udi = udi_it;
-					hal_device_property_set_string (d, "storage.bus", "bdi");
 				}
 			}
 
commit e82777cccd0bdde2bffbcf63698c49f9e2d9f5a3
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Tue Oct 28 22:56:01 2008 +0100

    revert BDI changes from SPEC
    
    Reverted BDI changes from SPEC. Reverted commits:
    - 51b8fcd53c31997d6b6bced7f6d735da12205f87
    - 32f8cf992112a04578b89967e13635658c2ba59d

diff --git a/doc/spec/hal-spec-properties.xml b/doc/spec/hal-spec-properties.xml
index 3d47c13..a942513 100644
--- a/doc/spec/hal-spec-properties.xml
+++ b/doc/spec/hal-spec-properties.xml
@@ -796,77 +796,6 @@ org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'}
       technologies is assumed for this section to be useful.
     </para>
 
-    <sect2 id="device-properties-bdi">
-      <title>
-        bdi namespace
-      </title>
-      <para>
-	Devices backing a memory (mmap) region, called Backing Device 
-	Information (BDI), are represented by device objects where 
-	<literal>info.subsystem</literal> equals <literal>bdi</literal>. 
-	The following properties are available for such device objects.
-      </para>
-      <informaltable>
-        <tgroup cols="2">
-          <thead>
-            <row>
-              <entry>Key (type)</entry>
-              <entry>Values</entry>
-              <entry>Mandatory</entry>
-              <entry>Description</entry>
-            </row>
-          </thead>
-          <tbody>
-            <row>
-              <entry>
-                <literal>bdi.id</literal> (int)
-              </entry>
-              <entry></entry>
-              <entry>Yes</entry>
-              <entry>Device identification</entry>
-            </row>
-            <row>
-              <entry>
-                <literal>bdi.read_ahead_kb</literal> (int)
-              </entry>
-              <entry></entry>
-              <entry>No</entry>
-              <entry>
-		Size of the read-ahead window in kilobytes
-		For more information check the Linux kernel documentation
-	      </entry>
-            </row>
-            <row>
-              <entry>
-                <literal>bdi.min_ratio</literal> (int)
-              </entry>
-              <entry></entry>
-              <entry>No</entry>
-              <entry>
-		The 'min_ratio' parameter contains information about the 
-		minimum percentage of the write-back cache to a particular 
-		device.
-		For more information check the Linux kernel documentation
-	      </entry>
-            </row>
-            <row>
-              <entry>
-                <literal>bdi.max_ratio</literal> (int)
-              </entry>
-              <entry></entry>
-              <entry>No</entry>
-              <entry>
-		The 'max_ratio' parameter contains information about the 
-		maximum percentage of the write-back cache a particular 
-		device can use. 
-		For more information check the Linux kernel documentation
-	      </entry>
-            </row>
-          </tbody>
-        </tgroup>
-      </informaltable>
-    </sect2>
-
     <sect2 id="device-properties-bluetooth_acl">
       <title>bluetooth_acl namespace</title>
       <para>
@@ -6236,12 +6165,6 @@ org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'}
             </row>
             <row>
               <entry></entry>
-              <entry>bdi</entry>
-              <entry></entry>
-              <entry>BDI (Backing Device Information) interface</entry>
-            </row>
-            <row>
-              <entry></entry>
               <entry>ccw</entry>
               <entry></entry>
               <entry>IBM s390/s390x ccw interface</entry>
commit 058f79a288b4d10db8c34b74d3cdda82659e8761
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Tue Oct 28 22:54:47 2008 +0100

    Revert "add support for the BDI subsystem"
    
    This reverts commit acae87869d452b989b167acabd09554bab28cc5d.
    
    Revert BDI related commits for now.

diff --git a/hald/linux/device.c b/hald/linux/device.c
index 37afb10..7917e03 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -127,57 +127,6 @@ backlight_compute_udi (HalDevice *d)
 /*--------------------------------------------------------------------------------------------------------------*/
 
 static HalDevice *
-bdi_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_dev,
-         const gchar *parent_path)
-{
-	HalDevice *d;
-	const gchar *id;
-
-	d = NULL;
-
-	if (parent_dev == NULL) {
-	        parent_dev = hal_device_store_find (hald_get_gdl (), "/org/freedesktop/Hal/devices/computer");
-		if (parent_dev == NULL) {
-                	parent_dev = hal_device_store_find (hald_get_tdl (), "/org/freedesktop/Hal/devices/computer");
-			if (parent_dev == NULL) {
-				HAL_ERROR (("Device '%s' has no parent and couldn't find computer root object."));
-				goto error;
-			}
-		}
-        }
-
-	d = hal_device_new ();
-	hal_device_property_set_string (d, "linux.sysfs_path", sysfs_path);
-	hal_device_property_set_string (d, "info.parent", hal_device_get_udi (parent_dev));
-	hal_device_property_set_string (d, "info.category", "bdi");
-	hal_device_add_capability (d, "bdi");
-	hal_device_property_set_string (d, "info.product", "Backing Device Information Device");
-
-	id = hal_util_get_last_element (sysfs_path);
-	hal_device_property_set_string (d, "bdi.id", id);	
-
-	hal_util_set_int_from_file (d, "bdi.read_ahead_kb", sysfs_path, "read_ahead_kb", 10);
-	hal_util_set_int_from_file (d, "bdi.min_ratio", sysfs_path, "min_ratio", 10);
-	hal_util_set_int_from_file (d, "bdi.max_ratio", sysfs_path, "max_ratio", 10);
-
-error:
-	return d;
-}
-
-static gboolean
-bdi_compute_udi (HalDevice *d)
-{
-	gchar udi[256];
-
-	hald_compute_udi (udi, sizeof (udi), "%s_bdi_%s", hal_device_property_get_string (d, "info.parent"),
-							  hal_device_property_get_string (d, "bdi.id"));
-	hal_device_set_udi (d, udi);
-	return TRUE;
-}
-
-/*--------------------------------------------------------------------------------------------------------------*/
-
-static HalDevice *
 bluetooth_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_dev, 
 	       const gchar *parent_path)
 {
@@ -1443,6 +1392,7 @@ net_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_de
 	gint flags;
 	gint addr_len;
 
+	d = NULL;
 	d = hal_device_new ();
 
 	if (parent_dev == NULL) {
@@ -4082,13 +4032,6 @@ static DevHandler dev_handler_backlight =
        .remove       = dev_remove
 };
 
-static DevHandler dev_handler_bdi = {
-	.subsystem   = "bdi",
-	.add         = bdi_add,
-	.compute_udi = bdi_compute_udi,
-	.remove      = dev_remove
-};
-
 static DevHandler dev_handler_bluetooth = 
 { 
 	.subsystem    = "bluetooth",
@@ -4433,7 +4376,6 @@ static DevHandler dev_handler_xen = {
 
 static DevHandler *dev_handlers[] = {
 	&dev_handler_backlight,
-	&dev_handler_bdi,
 	&dev_handler_bluetooth,
 	&dev_handler_ccw,
 	&dev_handler_ccwgroup,


More information about the hal-commit mailing list