plugin: let vendor/product filter be complementary
So that a plugin can specify a full VID and a specific PID subset of another VID as supported.
This commit is contained in:
@@ -308,6 +308,14 @@ apply_pre_probing_filters (MMPlugin *self,
|
|||||||
if (!self->priv->product_ids[i].l)
|
if (!self->priv->product_ids[i].l)
|
||||||
product_filtered = TRUE;
|
product_filtered = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* When both vendor ids and product ids are given, it may be the case that
|
||||||
|
* we're allowing a full VID1 and only a subset of another VID2, so try to
|
||||||
|
* handle that properly. */
|
||||||
|
if (vendor_filtered && !product_filtered)
|
||||||
|
vendor_filtered = FALSE;
|
||||||
|
if (product_filtered && self->priv->vendor_ids && !vendor_filtered)
|
||||||
|
product_filtered = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we got filtered by vendor or product IDs; mark it as unsupported only if:
|
/* If we got filtered by vendor or product IDs; mark it as unsupported only if:
|
||||||
|
Reference in New Issue
Block a user