X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcommon.c;h=530f73309327db8f0222acf2479e78799dfb8fcb;hb=7c0343ce60a3c51edb409de96dc08e2cc7a88abf;hp=c3e502ad97f96d478e9890638c9f59ae25489740;hpb=a24baf2ad70837ea46cacbfee6e03537cf284ad5;p=collectd.git diff --git a/src/common.c b/src/common.c index c3e502ad..530f7330 100644 --- a/src/common.c +++ b/src/common.c @@ -542,7 +542,8 @@ int check_create_dir (const char *file_orig) } while (42) { - if (stat (dir, &statbuf) == -1) + if ((stat (dir, &statbuf) == -1) + && (lstat (dir, &statbuf) == -1)) { if (errno == ENOENT) { @@ -876,12 +877,15 @@ int parse_value (const char *value, value_t *ret_value, int ds_type) } if (value == endptr) { - ERROR ("parse_value: Failed to parse string as number: %s.", value); + ERROR ("parse_value: Failed to parse string as %s: %s.", + DS_TYPE_TO_STRING (ds_type), value); return -1; } else if ((NULL != endptr) && ('\0' != *endptr)) - WARNING ("parse_value: Ignoring trailing garbage after number: %s.", - endptr); + INFO ("parse_value: Ignoring trailing garbage \"%s\" after %s value. " + "Input string was \"%s\".", + endptr, DS_TYPE_TO_STRING (ds_type), value); + return 0; } /* int parse_value */