+static gboolean check_plugin(struct connman_plugin_desc *desc,
+ const char *pattern, const char *exclude)
+{
+ if (exclude != NULL &&
+ g_pattern_match_simple(exclude, desc->name) == TRUE) {
+ connman_info("Excluding %s", desc->description);
+ return FALSE;
+ }
+
+ if (pattern != NULL &&
+ g_pattern_match_simple(pattern, desc->name) == FALSE) {
+ connman_info("Ignoring %s", desc->description);
+ return FALSE;
+ }