ifcfg-rh: allow leading spaces before variable names

This commit is contained in:
Thomas Haller 2016-10-31 14:58:58 +01:00
parent afc394b969
commit 85beac6dd4

View file

@ -333,6 +333,11 @@ find_line (shvarFile *s, const char *key)
for (s->current = s->lineList; s->current; s->current = s->current->next) {
line = s->current->data;
/* skip over leading spaces */
while (g_ascii_isspace (line[0]))
line++;
if (!strncmp (key, line, len) && line[len] == '=')
return line + len + 1;
}