summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c4ad079)
raw | patch | inline | side by side (parent: c4ad079)
author | Florian Forster <sifnfors@faui02g.informatik.uni-erlangen.de> | |
Mon, 29 Jan 2007 14:08:52 +0000 (15:08 +0100) | ||
committer | Florian Forster <sifnfors@faui02g.informatik.uni-erlangen.de> | |
Mon, 29 Jan 2007 14:08:52 +0000 (15:08 +0100) |
src/plugin.c | patch | blob | history | |
src/plugin.h | patch | blob | history |
diff --git a/src/plugin.c b/src/plugin.c
index b40d62a102fc1c9fd0dc7a39da539f0e1f049d4d..df2eb6b50df270f85f363f8a54f9b47bcad03b1f 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
return (0);
} /* int register_callback */
+static int plugin_unregister (llist_t *list, const char *name)
+{
+ llentry_t *e;
+
+ e = llist_search (list, name);
+
+ if (e == NULL)
+ return (-1);
+
+ llist_remove (list, e);
+
+ return (0);
+} /* int plugin_unregister */
+
/*
* (Try to) load the shared object `file'. Won't complain if it isn't a shared
* object, but it will bitch about a shared object not having a
return (register_callback (&list_data_set, ds->type, (void *) ds));
} /* int plugin_register_data_set */
+int plugin_unregister_init (const char *name)
+{
+ return (plugin_unregister (list_init, name));
+}
+
+int plugin_unregister_read (const char *name)
+{
+ return (plugin_unregister (list_read, name));
+}
+
+int plugin_unregister_write (const char *name)
+{
+ return (plugin_unregister (list_write, name));
+}
+
+int plugin_unregister_shutdown (const char *name)
+{
+ return (plugin_unregister (list_shutdown, name));
+}
+
+int plugin_unregister_data_set (const char *name)
+{
+ return (plugin_unregister (list_data_set, name));
+}
+
void plugin_init_all (void)
{
int (*callback) (void);
diff --git a/src/plugin.h b/src/plugin.h
index 107078e7ca6e75909d3ecd6559749a37575009e8..b0bdbee12f164a3fc96b0c1bd4f1d85f69c44998 100644 (file)
--- a/src/plugin.h
+++ b/src/plugin.h
int (*callback) (void));
int plugin_register_data_set (const data_set_t *ds);
+int plugin_unregister_init (const char *name);
+int plugin_unregister_read (const char *name);
+int plugin_unregister_write (const char *name);
+int plugin_unregister_shutdown (const char *name);
+int plugin_unregister_data_set (const char *name);
+
/*
* NAME
* plugin_dispatch_values