X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcommon.h;h=63ecca390e1645cfbdbdc697f90630245e611f01;hb=debf97972666d688bace07d1b5ee3ef958ac7cee;hp=7b9fa0ac658b3cbb33c9498316f6152c3c2b8268;hpb=07be522384e753b7921213a0dc96a50336c79a66;p=collectd.git diff --git a/src/common.h b/src/common.h index 7b9fa0ac..63ecca39 100644 --- a/src/common.h +++ b/src/common.h @@ -258,6 +258,9 @@ int format_name (char *ret, int ret_len, #define FORMAT_VL(ret, ret_len, vl) \ format_name (ret, ret_len, (vl)->host, (vl)->plugin, (vl)->plugin_instance, \ (vl)->type, (vl)->type_instance) +int format_values (char *ret, size_t ret_len, + const data_set_t *ds, const value_list_t *vl, + _Bool store_rates); int parse_identifier (char *str, char **ret_host, char **ret_plugin, char **ret_plugin_instance, @@ -282,7 +285,7 @@ int notification_init (notification_t *n, int severity, const char *message, typedef int (*dirwalk_callback_f)(const char *dirname, const char *filename, void *user_data); int walk_directory (const char *dir, dirwalk_callback_f callback, - void *user_data); + void *user_data, int hidden); int read_file_contents (const char *filename, char *buf, int bufsize); counter_t counter_diff (counter_t old_value, counter_t new_value); @@ -291,4 +294,8 @@ counter_t counter_diff (counter_t old_value, counter_t new_value); * (in the range [1-65535]). Returns less than zero on error. */ int service_name_to_port_number (const char *service_name); +/** Parse a string to a derive_t value. Returns zero on success or non-zero on + * failure. If failure is returned, ret_value is not touched. */ +int strtoderive (const char *string, derive_t *ret_value); + #endif /* COMMON_H */