Merge pull request #10742 from poettering/c-utf8

default to C.UTF-8 locale, and many improvements to env var file parsing/kernel cmdline parsing
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-11-15 12:47:17 +01:00
committed by GitHub
43 changed files with 404 additions and 329 deletions
+1 -1
View File
@@ -339,7 +339,7 @@ int show_cgroup_get_path_and_warn(
const char *m;
m = strjoina("/run/systemd/machines/", machine);
r = parse_env_file(NULL, m, NEWLINE, "SCOPE", &unit, NULL);
r = parse_env_file(NULL, m, "SCOPE", &unit);
if (r < 0)
return log_error_errno(r, "Failed to load machine data: %m");
+1 -1
View File
@@ -471,7 +471,7 @@ static int condition_test_needs_update(Condition *c) {
uint64_t timestamp;
int r;
r = parse_env_file(NULL, p, NULL, "TIMESTAMP_NSEC", &timestamp_str, NULL);
r = parse_env_file(NULL, p, "TIMESTAMP_NSEC", &timestamp_str);
if (r < 0) {
log_error_errno(r, "Failed to parse timestamp file '%s', using mtime: %m", p);
return true;
+2 -2
View File
@@ -1333,14 +1333,14 @@ int dissected_image_acquire_metadata(DissectedImage *m) {
}
case META_MACHINE_INFO:
r = load_env_file_pairs(f, "machine-info", NULL, &machine_info);
r = load_env_file_pairs(f, "machine-info", &machine_info);
if (r < 0)
log_debug_errno(r, "Failed to read /etc/machine-info: %m");
break;
case META_OS_RELEASE:
r = load_env_file_pairs(f, "os-release", NULL, &os_release);
r = load_env_file_pairs(f, "os-release", &os_release);
if (r < 0)
log_debug_errno(r, "Failed to read OS release file: %m");
+1 -1
View File
@@ -1114,7 +1114,7 @@ int image_read_metadata(Image *i) {
if (r < 0 && r != -ENOENT)
log_debug_errno(r, "Failed to chase /etc/machine-info in image %s: %m", i->name);
else if (r >= 0) {
r = load_env_file_pairs(NULL, path, NULL, &machine_info);
r = load_env_file_pairs(NULL, path, &machine_info);
if (r < 0)
log_debug_errno(r, "Failed to parse machine-info data of %s: %m", i->name);
}
+1 -1
View File
@@ -47,7 +47,7 @@ static void load_testdata_env(void) {
dirname(s);
envpath = path_join(NULL, s, "systemd-runtest.env");
if (load_env_file_pairs(NULL, envpath, NULL, &pairs) < 0)
if (load_env_file_pairs(NULL, envpath, &pairs) < 0)
return;
STRV_FOREACH_PAIR(k, v, pairs)
+2 -3
View File
@@ -29,12 +29,11 @@ int udev_parse_config_full(
_cleanup_free_ char *log_val = NULL, *children_max = NULL, *exec_delay = NULL, *event_timeout = NULL, *resolve_names = NULL;
int r;
r = parse_env_file(NULL, "/etc/udev/udev.conf", NEWLINE,
r = parse_env_file(NULL, "/etc/udev/udev.conf",
"udev_log", &log_val,
"children_max", &children_max,
"exec_delay", &exec_delay,
"event_timeout", &event_timeout,
NULL);
"event_timeout", &event_timeout);
if (r == -ENOENT)
return 0;
if (r < 0)