X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fconfigfile.c;h=4b6803ed68a398cbdff4881ad9e599b2ad9d3639;hb=c6042292896e79abc56c39b1f7eccfc2dde91f32;hp=c63240e7005a95f9bff775852a7510568293eb60;hpb=d78a04845e1c9b5b8a376728f5ec621b6e95185b;p=collectd.git diff --git a/src/configfile.c b/src/configfile.c index c63240e7..4b6803ed 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -59,7 +59,6 @@ typedef struct cf_global_option_s * Prototypes of callback functions */ static int dispatch_value_plugindir (const oconfig_item_t *ci); -static int dispatch_value_loadds (const oconfig_item_t *ci); static int dispatch_value_loadplugin (const oconfig_item_t *ci); /* @@ -70,8 +69,7 @@ static cf_callback_t *first_callback = NULL; static cf_value_map_t cf_value_map[] = { {"PluginDir", dispatch_value_plugindir}, - {"LoadPlugin", dispatch_value_loadplugin}, - {"LoadDS", dispatch_value_loadds} + {"LoadPlugin", dispatch_value_loadplugin} }; static int cf_value_map_num = STATIC_ARRAY_LEN (cf_value_map); @@ -81,7 +79,8 @@ static cf_global_option_t cf_global_options[] = {"PIDFile", NULL, PIDFILE}, {"Hostname", NULL, NULL}, {"Interval", NULL, "10"}, - {"ReadThreads", NULL, "5"} + {"ReadThreads", NULL, "5"}, + {"TypesDB", NULL, PLUGINDIR"/types.db"} /* FIXME: Configure path */ }; static int cf_global_options_num = STATIC_ARRAY_LEN (cf_global_options); @@ -183,18 +182,6 @@ static int dispatch_value_plugindir (const oconfig_item_t *ci) return (0); } -static int dispatch_value_loadds (const oconfig_item_t *ci) -{ - assert (strcasecmp (ci->key, "LoadDS") == 0); - - if (ci->values_num != 1) - return (-1); - if (ci->values[0].type != OCONFIG_TYPE_STRING) - return (-1); - - return (plugin_load (ci->values[0].value.string, MR_DATASETS)); -} /* int dispatch_value_loadds */ - static int dispatch_value_loadplugin (const oconfig_item_t *ci) { assert (strcasecmp (ci->key, "LoadPlugin") == 0); @@ -204,7 +191,7 @@ static int dispatch_value_loadplugin (const oconfig_item_t *ci) if (ci->values[0].type != OCONFIG_TYPE_STRING) return (-1); - return (plugin_load (ci->values[0].value.string, MR_EVERYTHING)); + return (plugin_load (ci->values[0].value.string)); } /* int dispatch_value_loadplugin */ static int dispatch_value_plugin (const char *plugin, oconfig_item_t *ci)