]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/conf-parser: allow sections to be silently ignored with new -Section syntax
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 22 Nov 2019 10:16:17 +0000 (11:16 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 22 Nov 2019 14:27:22 +0000 (15:27 +0100)
commitddeb3f5d4b7ce67c23fde0ad149fb06b29a92f2a
tree82c53f8285bba95c919876c9195158cbd2202e50
parent94a404cb0357fd30bee34ee94cbb481e97098ce1
shared/conf-parser: allow sections to be silently ignored with new -Section syntax

If we ignore any uknown section, we will not be able to show any
warning if a typo in a section name is made. Let's reverse our
approach, and explicitly list sections to ignore instead.

I opted to make use the same section list for this, instead of adding a second
list, because this list is passed through to many functions and adding yet
another parameter to the long signature would be very noisy.
src/shared/conf-parser.c
src/test/test-conf-parser.c