diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-01-05 22:05:58 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-01-05 22:05:58 +0100 |
commit | d829de8ea9a373bbc67ade2939102aedca50cd5f (patch) | |
tree | 47d6efc2dee5250e1eadafa3d63dfe48d7c680e9 /src/plugin.c | |
parent | 22a16114452511c732e2d72bf11666145f87eca8 (diff) | |
download | connman-d829de8ea9a373bbc67ade2939102aedca50cd5f.tar.gz connman-d829de8ea9a373bbc67ade2939102aedca50cd5f.tar.bz2 connman-d829de8ea9a373bbc67ade2939102aedca50cd5f.zip |
Add support for plugin pattern via command line
Diffstat (limited to 'src/plugin.c')
-rw-r--r-- | src/plugin.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugin.c b/src/plugin.c index 2ebe327f..716eb7cc 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -60,7 +60,7 @@ static gboolean add_plugin(void *handle, struct connman_plugin_desc *desc) return TRUE; } -int __connman_plugin_init(void) +int __connman_plugin_init(const char *pattern) { GDir *dir; const gchar *file; @@ -97,6 +97,13 @@ int __connman_plugin_init(void) continue; } + if (g_pattern_match_simple(pattern, + desc->name) == FALSE) { + DBG("ignoring %s", desc->description); + dlclose(handle); + continue; + } + if (add_plugin(handle, desc) == FALSE) dlclose(handle); } |