-config_t *parse_config_line(char *line, const char *fname, int lineno) {
- config_t *cfg;
- int len;
- char *variable, *value, *eol;
- variable = value = line;
-
- eol = line + strlen(line);
- while(strchr("\t ", *--eol))
- *eol = '\0';
-
- len = strcspn(value, "\t =");
- value += len;
- value += strspn(value, "\t ");
- if(*value == '=') {
- value++;
- value += strspn(value, "\t ");
- }
- variable[len] = '\0';
-
- if(!*value) {
- const char err[] = "No value for variable";
- if (fname)
- logger(DEBUG_ALWAYS, LOG_ERR, "%s `%s' on line %d while reading config file %s",
- err, variable, lineno, fname);
- else
- logger(DEBUG_ALWAYS, LOG_ERR, "%s `%s' in command line option %d",
- err, variable, lineno);
- return NULL;
+ if(!f) {
+ logger(mesh, MESHLINK_ERROR, "Failed to open `%s': %s", path, strerror(errno));
+ return false;