src/configfile.[ch]: Implement "cf_util_get_string".
[collectd.git] / src / configfile.h
index 3952c18..aca5877 100644 (file)
@@ -86,4 +86,9 @@ int cf_read (char *filename);
 int global_option_set (const char *option, const char *value);
 const char *global_option_get (const char *option);
 
+/* Assures the config option is a string, duplicates it and returns the copy in
+ * "ret_string". If necessary "*ret_string" is freed first. Returns zero upon
+ * success. */
+int cf_util_get_string (const oconfig_item_t *ci, char **ret_string);
+
 #endif /* defined(CONFIGFILE_H) */