File mm-option-require-option-driver.patch of Package ModemManager

Index: ModemManager-0.1/plugins/mm-plugin-option.c
===================================================================
--- ModemManager-0.1.orig/plugins/mm-plugin-option.c
+++ ModemManager-0.1/plugins/mm-plugin-option.c
@@ -77,8 +77,14 @@ supports_udi (MMPlugin *plugin, LibHalCo
                 int vendor;
 
                 vendor = libhal_device_get_property_int (hal_ctx, parent_udi, "usb.vendor_id", NULL);
-                if (vendor == 0x0af0)
-                    supported = TRUE;
+                if (vendor == 0x0af0) {
+                    char *driver;
+
+                    driver = libhal_device_get_property_string (hal_ctx, parent_udi, "info.linux.driver", NULL);
+                    if (driver && !strcmp (driver, "option"))
+                        supported = TRUE;
+                    libhal_free_string (driver);
+                }
 
                 libhal_free_string (parent_udi);
             }
openSUSE Build Service is sponsored by