about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2008-04-03 01:29:36 +0000
committerMichael Biebl <biebl@debian.org>2008-04-03 01:29:36 +0000
commit43c312ba7032101a1c6c962f4aa7da056c710d7c (patch)
treee36e4a32098ac7d886267f8f8d673413f5aa8a59
parenteb8f8ce9dc798e8c9ec6b0adb7709ad18a8330ae (diff)
debian/patches/08-hal_deprecated_keys.patch
- Add support for the "net.originating_device" key, which has replaced
the deprecated "net.physical_device" key in newer HAL versions.

git-svn-id: svn+ssh://svn.debian.org/svn/pkg-utopia/packages/unstable/networkmanager@2160 ceb527fc-18e6-0310-9fe2-813c157c29e7
-rw-r--r--debian/changelog3
-rw-r--r--debian/patches/08-hal_deprecated_keys.patch34
2 files changed, 37 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index aa1d5892..a0103566 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,9 @@ network-manager (0.6.6-1) UNRELEASED; urgency=low
   * debian/patches/07-domain_search.patch
     - Add support for DHCP domain-search option. (Closes: #465158)
       Thanks to Bas Zoetekouw for the patch.
+  * debian/patches/08-hal_deprecated_keys.patch
+    - Add support for the "net.originating_device" key, which has replaced
+      the deprecated "net.physical_device" key in newer HAL versions.
   * debian/patches/06-dispatch_more_events.patch
     - NetworkManagerDispatcher.1.in has been renamed to
       NetworkManagerDispatcher.8.in. Update the patch accordingly.
diff --git a/debian/patches/08-hal_deprecated_keys.patch b/debian/patches/08-hal_deprecated_keys.patch
new file mode 100644
index 00000000..5e09f8c2
--- /dev/null
+++ b/debian/patches/08-hal_deprecated_keys.patch
@@ -0,0 +1,34 @@
+Index: src/nm-device.c
+===================================================================
+--- src/nm-device.c	(Revision 3527)
++++ src/nm-device.c	(Arbeitskopie)
+@@ -115,19 +115,24 @@
+ nm_get_device_driver_name (LibHalContext *ctx, const char *udi)
+ {
+ 	char	*	driver_name = NULL;
+-	char *	physdev_udi = NULL;
++	char *	origdev_udi = NULL;
+ 
+ 	g_return_val_if_fail (ctx != NULL, NULL);
+ 	g_return_val_if_fail (udi != NULL, NULL);
+ 
+-	physdev_udi = libhal_device_get_property_string (ctx, udi, "net.physical_device", NULL);
+-	if (physdev_udi && libhal_device_property_exists (ctx, physdev_udi, "info.linux.driver", NULL))
++	origdev_udi = libhal_device_get_property_string (ctx, udi, "net.originating_device", NULL);
++	if (!origdev_udi) {
++		/* Older HAL uses 'physical_device' */
++		origdev_udi = libhal_device_get_property_string (ctx, udi, "net.physical_device", NULL);
++	}
++
++	if (origdev_udi && libhal_device_property_exists (ctx, origdev_udi, "info.linux.driver", NULL))
+ 	{
+-		char *drv = libhal_device_get_property_string (ctx, physdev_udi, "info.linux.driver", NULL);
++		char *drv = libhal_device_get_property_string (ctx, origdev_udi, "info.linux.driver", NULL);
+ 		driver_name = g_strdup (drv);
+ 		g_free (drv);
+ 	}
+-	g_free (physdev_udi);
++	g_free (origdev_udi);
+ 
+ 	return driver_name;
+ }