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:
parent
e05458f5c9
commit
313b78569e
@ -4973,13 +4973,24 @@ void unit_dump_config_items(FILE *f) {
|
||||
|
||||
NULSTR_FOREACH(i, load_fragment_gperf_nulstr) {
|
||||
const char *rvalue = "OTHER", *lvalue;
|
||||
unsigned j;
|
||||
const ConfigPerfItem *p;
|
||||
size_t prefix_len;
|
||||
const char *dot;
|
||||
const ConfigPerfItem *p;
|
||||
unsigned j;
|
||||
|
||||
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, '.');
|
||||
lvalue = dot ? dot + 1 : i;
|
||||
prefix_len = dot-i;
|
||||
@ -4992,12 +5003,6 @@ void unit_dump_config_items(FILE *f) {
|
||||
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);
|
||||
prev = i;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user