Patch to support drivers compiled into the kernel
- From: Bill C Riemers <briemers redhat com>
- To: NetworkManager-list gnome org
- Subject: Patch to support drivers compiled into the kernel
- Date: Tue, 03 Mar 2009 09:54:51 -0500
Currently, NetworkManager ignores any network driver that does not have
a loadable module associated with it. This is a problem, when the
network driver has been compiled directly into the kernel. This is
typically done for coLinux, and other environments where a loadable
module network driver is not supported.
The following patch marks the driver for such devices as "<kernel>", so
that NetworkManager will not ignore them. However, NetworkManager will
still ignore network devices which do not have a driver associated with
them and is not built-in as part of the kernel.
Note: I created this patch on Fedora 10, against the 0.7.0-1 version.
Please let me know if I need to do a git checkout and rebuild this patch
against the current code base.
Bill
diff -ur NetworkManager-0.7.0/src/nm-hal-manager.c NetworkManager-0.7.0-builtin/src/nm-hal-manager.c
--- NetworkManager-0.7.0/src/nm-hal-manager.c 2009-03-02 19:11:44.000000000 -0500
+++ NetworkManager-0.7.0-builtin/src/nm-hal-manager.c 2009-03-02 19:50:09.000000000 -0500
@@ -119,12 +119,17 @@
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)) {
+ if (origdev_udi) {
+ if (libhal_device_property_exists (ctx, origdev_udi, "info.linux.driver", NULL)) {
char *drv = libhal_device_get_property_string (ctx, origdev_udi, "info.linux.driver", NULL);
driver_name = g_strdup (drv);
libhal_free_string (drv);
- }
- libhal_free_string (origdev_udi);
+ }
+ else if(!strcmp(origdev_udi,"/org/freedesktop/Hal/devices/computer")) {
+ driver_name = g_strdup ("<kernel>");
+ }
+ libhal_free_string (origdev_udi);
+ }
return driver_name;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]