diff options
author | Dan Williams <dcbw@redhat.com> | 2010-02-25 17:24:37 -0800 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2010-02-25 17:24:37 -0800 |
commit | 69002d7ef123c2ba4e2506e6708c4efb3dedd5d0 (patch) | |
tree | 8313a46543eaf347bf828ad2ef19020af1d39673 | |
parent | 8564371cc6f260bd7e566818f722e363988b6a5e (diff) |
hal: allow devices with the driver 'usb'
libertas is busted and points the driver link at the usb device
not the usb interface. Since 0.7.2 and earlier accepted the
'usb' driver, don't break stuff.
-rw-r--r-- | src/nm-hal-manager.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nm-hal-manager.c b/src/nm-hal-manager.c index 2909cdd219..0e118990a4 100644 --- a/src/nm-hal-manager.c +++ b/src/nm-hal-manager.c @@ -156,8 +156,14 @@ nm_get_device_driver_name (LibHalContext *ctx, const char *udi) if ( !strcmp (drv, "usb") || !strcmp (drv, "ehci_hcd") || !strcmp (drv, "yenta_cardbus")) { - libhal_free_string (drv); - drv = NULL; + /* Some drivers (libertas) are broken and report 'usb' as the + * driver name even though the sysfs links are present. Since + * 0.7.2 used to handle that, we should stay compatible. + */ + if (strcmp (drv, "usb") != 0) { + libhal_free_string (drv); + drv = NULL; + } break; } } else { |