port-probe: don't probe ignored ports
If a port has been flagged as ignored with the ID_MM_PORT_IGNORE udev property, we shouldn't open and probe the ports in any way, just flag them as ignored. We still report them in the list of modem ports, but just with "unknown" type and therefore not using them for anything.
This commit is contained in:
@@ -1351,6 +1351,15 @@ mm_port_probe_run (MMPortProbe *self,
|
||||
/* The context will be owned by the task */
|
||||
g_task_set_task_data (self->priv->task, ctx, (GDestroyNotify) port_probe_run_context_free);
|
||||
|
||||
/* If we're told to completely ignore the port, don't do any probing */
|
||||
if (self->priv->is_ignored) {
|
||||
mm_dbg ("(%s/%s) port probing finished: skipping for blacklisted port",
|
||||
mm_kernel_device_get_subsystem (self->priv->port),
|
||||
mm_kernel_device_get_name (self->priv->port));
|
||||
port_probe_task_return_boolean (self, TRUE);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Check if we already have the requested probing results.
|
||||
* We will fix here the 'ctx->flags' so that we only request probing
|
||||
* for the missing things. */
|
||||
|
||||
Reference in New Issue
Block a user