resolvectl: use compat status string instead of a field-by-field table

The status string is modeled after our --version output: +enabled -disabled equals=more-info

For example:
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=allow-downgrade/supported
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-10-20 19:58:37 +02:00
parent af781878d5
commit fe37e5a5d1
2 changed files with 71 additions and 22 deletions
+4
View File
@@ -53,6 +53,10 @@ static inline const char* true_false(bool b) {
return b ? "true" : "false";
}
static inline const char* plus_minus(bool b) {
return b ? "+" : "-";
}
static inline const char* one_zero(bool b) {
return b ? "1" : "0";
}