aboutsummaryrefslogtreecommitdiff
path: root/plugins/mm-plugin-generic.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2009-10-05 09:52:01 -0700
committerDan Williams <dcbw@redhat.com>2009-10-05 09:52:01 -0700
commit912b98723b2965b9aaf1f0328781a2730d7cc178 (patch)
treebb14053467b6551ac6b49b2cdf18f0183bd1a55e /plugins/mm-plugin-generic.c
parent3b19a85727458821f5df20153f8c04bc7717ba30 (diff)
parentaa78b5f5e5319e04f5b57f928bfab69dd4b93d88 (diff)
Merge commit 'origin/master' into enable-split
Diffstat (limited to 'plugins/mm-plugin-generic.c')
-rw-r--r--plugins/mm-plugin-generic.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/plugins/mm-plugin-generic.c b/plugins/mm-plugin-generic.c
index 802ab888..3b6cd198 100644
--- a/plugins/mm-plugin-generic.c
+++ b/plugins/mm-plugin-generic.c
@@ -108,16 +108,27 @@ grab_port (MMPluginBase *base,
{
GUdevDevice *port = NULL, *physdev = NULL;
MMModem *modem = NULL;
- const char *name, *subsys, *devfile, *sysfs_path;
+ const char *name, *subsys, *devfile, *sysfs_path, *driver;
guint32 caps;
port = mm_plugin_base_supports_task_get_port (task);
g_assert (port);
+ subsys = g_udev_device_get_subsystem (port);
+ name = g_udev_device_get_name (port);
+
devfile = g_udev_device_get_device_file (port);
if (!devfile) {
- g_set_error (error, 0, 0, "Could not get port's sysfs file.");
- return NULL;
+ driver = mm_plugin_base_supports_task_get_driver (task);
+ if (!driver || strcmp (driver, "bluetooth")) {
+ g_set_error (error, 0, 0, "Could not get port's sysfs file.");
+ return NULL;
+ } else {
+ g_message ("%s: (%s/%s) WARNING: missing udev 'device' file",
+ mm_plugin_get_name (MM_PLUGIN (base)),
+ subsys,
+ name);
+ }
}
physdev = mm_plugin_base_supports_task_get_physdev (task);
@@ -128,9 +139,6 @@ grab_port (MMPluginBase *base,
return NULL;
}
- subsys = g_udev_device_get_subsystem (port);
- name = g_udev_device_get_name (port);
-
caps = mm_plugin_base_supports_task_get_probed_capabilities (task);
if (!existing) {
if (caps & MM_PLUGIN_BASE_PORT_CAP_GSM) {