]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolvectl: add print_configuration() to consolidate status logic 40529/head
authorNick Rosbrook <enr0n@ubuntu.com>
Fri, 30 Jan 2026 21:04:37 +0000 (16:04 -0500)
committerNick Rosbrook <enr0n@ubuntu.com>
Tue, 3 Feb 2026 20:07:41 +0000 (15:07 -0500)
commita4750a6612b20cf108d56cd2acc5e109adfa91c3
tree708c517c9e11ebe2367f0f467e705e8bc8ee734e
parent480ebdfdddbe61c7c47d41ee1be31f867eb0269f
resolvectl: add print_configuration() to consolidate status logic

There is a lot of duplication across the functions for printing global,
link, and delegate output. Since these all use a common DNSConfiguration
type now, the logic can be consolidated.

Adapt printing and format helper functions to accept a DNSConfiguration
parameter to appropriately format output. Then, add print_configuration(),
a single function that prints the appropriate status output based on the
contents of DNSConfiguration.
src/resolve/resolvectl.c