X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Fcommon.h;h=6d01ca4bdeef5e3b1a74bea55c1686bcddb9a5cb;hb=10139cda6f68ae1f921d79c930dd85944afb74a3;hp=9a9ae0d3fd30cc019af7da63eedefaa379f1cdd3;hpb=afb38f31abd27d5b4ce08023f8bbbaeeb353c55f;p=collectd.git diff --git a/src/daemon/common.h b/src/daemon/common.h index 9a9ae0d3..6d01ca4b 100644 --- a/src/daemon/common.h +++ b/src/daemon/common.h @@ -325,6 +325,11 @@ int parse_identifier_vl (const char *str, value_list_t *vl); int parse_value (const char *value, value_t *ret_value, int ds_type); int parse_values (char *buffer, value_list_t *vl, const data_set_t *ds); +/* parse_value_file reads "path" and parses its content as an integer or + * floating point, depending on "ds_type". On success, the value is stored in + * "ret_value" and zero is returned. On failure, a non-zero value is returned. */ +int parse_value_file (char const *path, value_t *ret_value, int ds_type); + #if !HAVE_GETPWNAM_R int getpwnam_r (const char *name, struct passwd *pwbuf, char *buf, size_t buflen, struct passwd **pwbufp);