1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

core: drop deprecated (and ignored) configuration items from --dump-configuration-items output

This commit is contained in:
Lennart Poettering 2018-05-28 21:47:12 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent e05458f5c9
commit 313b78569e

View File

@ -4973,13 +4973,24 @@ void unit_dump_config_items(FILE *f) {
NULSTR_FOREACH(i, load_fragment_gperf_nulstr) { NULSTR_FOREACH(i, load_fragment_gperf_nulstr) {
const char *rvalue = "OTHER", *lvalue; const char *rvalue = "OTHER", *lvalue;
unsigned j; const ConfigPerfItem *p;
size_t prefix_len; size_t prefix_len;
const char *dot; const char *dot;
const ConfigPerfItem *p; unsigned j;
assert_se(p = load_fragment_gperf_lookup(i, strlen(i))); assert_se(p = load_fragment_gperf_lookup(i, strlen(i)));
/* Hide legacy settings */
if (p->parse == config_parse_warn_compat &&
p->ltype == DISABLED_LEGACY)
continue;
for (j = 0; j < ELEMENTSOF(table); j++)
if (p->parse == table[j].callback) {
rvalue = table[j].rvalue;
break;
}
dot = strchr(i, '.'); dot = strchr(i, '.');
lvalue = dot ? dot + 1 : i; lvalue = dot ? dot + 1 : i;
prefix_len = dot-i; prefix_len = dot-i;
@ -4992,12 +5003,6 @@ void unit_dump_config_items(FILE *f) {
fprintf(f, "[%.*s]\n", (int) prefix_len, i); fprintf(f, "[%.*s]\n", (int) prefix_len, i);
} }
for (j = 0; j < ELEMENTSOF(table); j++)
if (p->parse == table[j].callback) {
rvalue = table[j].rvalue;
break;
}
fprintf(f, "%s=%s\n", lvalue, rvalue); fprintf(f, "%s=%s\n", lvalue, rvalue);
prev = i; prev = i;
} }