chiark / gitweb /
basic: add string table macros for "extended boolean" enums
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Jan 2016 16:10:17 +0000 (17:10 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 17 May 2017 13:22:15 +0000 (15:22 +0200)
commitd7ef73f05df04d2b6d59932fd3d21f155665a888
tree03e56d0efb3cb189654cc982109c8d3a98eb1fc0
parentcda31ba58ea9360348d0b3b341b3155d65502405
basic: add string table macros for "extended boolean" enums

In a couple of cases we maintain configuration settings that know an on
and off state, like a boolean, plus some additional states. We generally
parse them as booleans first, and if that fails check for specific
additional values.

This adds a generalized set of macros for parsing such settings, and
ports one use in resolved and another in networkd over to it.
src/basic/string-table.h