X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcommon.c;h=0069a8b6508691b4fd2270642d10452428606fc4;hb=4ecefb9fb8183eadee48538553615c0425e51f69;hp=7015c875f0fd9c664b99e6c19a54e9ff397f85fa;hpb=50c6b81549e3239034f71f00ff7dde4c6a8767e5;p=collectd.git diff --git a/src/common.c b/src/common.c index 7015c875..0069a8b6 100644 --- a/src/common.c +++ b/src/common.c @@ -543,7 +543,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) { @@ -980,12 +981,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 */