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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user