shared: rework env file reader

Implement this with a proper state machine, so that newlines and
escaped chars can appear in string assignments. This should bring the
parser much closer to shell.
This commit is contained in:
Lennart Poettering
2013-04-03 20:12:57 +02:00
parent 7f602784de
commit f73141d765
9 changed files with 442 additions and 151 deletions
+1 -1
View File
@@ -303,7 +303,7 @@ static int write_data_other(void) {
char **l = NULL;
int r, p;
r = load_env_file("/etc/machine-info", &l);
r = load_env_file("/etc/machine-info", NULL, &l);
if (r < 0 && r != -ENOENT)
return r;