]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: add helper settings_network_configured()
authorLennart Poettering <lennart@poettering.net>
Tue, 9 Nov 2021 17:21:15 +0000 (18:21 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 9 Nov 2021 17:32:10 +0000 (18:32 +0100)
commita1dfd585c4a3a737b0c4b61e82148bbdfd201733
treeef5087c0ceafce097c89dd6aa2556cd4c15f92c5
parent8c1e088ac9ca2722122774d6839fae3ccf6b48fc
nspawn: add helper settings_network_configured()

The new helper returns whether the settings file had *any* networking
setting configured at all. We already have a similar helper
settings_private_network() which returns a similar result. The
difference is that the new helper will return true when the private
network was explicitly turned off, while the old one will only return
true if configured and enabled.

We'll reuse the helper a 2nd time later on, but even without it it makes
things a bit more readable.
src/nspawn/nspawn-settings.c
src/nspawn/nspawn-settings.h
src/nspawn/nspawn.c