@@ -77,33 +77,13 @@ struct tep_plugin_option {
*
* int TEP_PLUGIN_UNLOADER(struct tep_handle *tep)
*
- * TEP_PLUGIN_OPTIONS: (optional)
- * Plugin options that can be set before loading
- *
- * struct tep_plugin_option TEP_PLUGIN_OPTIONS[] = {
- * {
- * .name = "option-name",
- * .description = "description of option to show users",
- * },
- * {
- * .name = NULL,
- * },
- * };
- *
- * Array must end with .name = NULL;
- *
- * If .value is not set, then it is considered a boolean and only
- * .set will be processed. If .value is defined, then it is considered
- * a string option and .set will be ignored.
*/
#define TEP_PLUGIN_LOADER tep_plugin_loader
#define TEP_PLUGIN_UNLOADER tep_plugin_unloader
-#define TEP_PLUGIN_OPTIONS tep_plugin_options
#define _MAKE_STR(x) #x
#define MAKE_STR(x) _MAKE_STR(x)
#define TEP_PLUGIN_LOADER_NAME MAKE_STR(TEP_PLUGIN_LOADER)
#define TEP_PLUGIN_UNLOADER_NAME MAKE_STR(TEP_PLUGIN_UNLOADER)
-#define TEP_PLUGIN_OPTIONS_NAME MAKE_STR(TEP_PLUGIN_OPTIONS)
enum tep_format_flags {
TEP_FIELD_IS_ARRAY = 1,
@@ -427,7 +427,6 @@ load_plugin(struct tep_handle *tep, const char *path,
const char *file, void *data)
{
struct tep_plugin_list **plugin_list = data;
- struct tep_plugin_option *options;
tep_plugin_load_func func;
struct tep_plugin_list *list;
char *plugin;
@@ -447,16 +446,6 @@ load_plugin(struct tep_handle *tep, const char *path,
goto out_free;
}
- options = dlsym(handle, TEP_PLUGIN_OPTIONS_NAME);
- if (options) {
- while (options->name) {
- ret = update_option(file, options);
- if (ret < 0)
- goto out_free;
- options++;
- }
- }
-
func = dlsym(handle, TEP_PLUGIN_LOADER_NAME);
if (!func) {
warning("could not find func '%s' in plugin '%s'\n%s\n",
When loading a plugin, the current API searches for TEP_PLUGIN_OPTIONS array in plugin's symbols and loads any options from it. This API duplicates tep_plugin_add_options() In order to simplify the APIs, The duplicated TEP_PLUGIN_OPTIONS is removed as an API, as it is not used by any existing plugin. The tep_plugin_add_options() API is the only way to register plugin options. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> --- include/traceevent/event-parse.h | 20 -------------------- lib/traceevent/event-plugin.c | 11 ----------- 2 files changed, 31 deletions(-)