X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fconfigfile.h;h=aca58770efbdc9dbd530d06b399fd2d6510158f2;hb=275bc6640dfc2ba747dd64884d9e91191f06fa82;hp=3952c180d9949f08bc42a94899d23a9c19a5db70;hpb=c55316847bbd97410e65892b97f022e74bfe9b0f;p=collectd.git diff --git a/src/configfile.h b/src/configfile.h index 3952c180..aca58770 100644 --- a/src/configfile.h +++ b/src/configfile.h @@ -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) */