]> git.ipfire.org Git - thirdparty/ulogd2.git/commit
ulogd: add ulogd_parse_configfile public function
authorCorubba Smith <corubba@gmx.de>
Wed, 12 Mar 2025 14:52:29 +0000 (15:52 +0100)
committerFlorian Westphal <fw@strlen.de>
Wed, 12 Mar 2025 15:05:14 +0000 (16:05 +0100)
commit64699d8103a43e09d2b5df57558c5f5a05583fe8
treece9cb5af3065b34bc06efb1779cec15a9880c194
parentb9f931e2f30e67af4d47f184f94a9d5af29b0df0
ulogd: add ulogd_parse_configfile public function

Provide a new function `ulogd_parse_configfile()` in the public
interface, which wraps `parse_config_file()` to parse a section of the
config file and communicates found errors to the user. It can be used
as a drop-in replacement because arguments and return value are
compatible.

This relieves plugins of the need to translate the individual error
codes to human readable messages, and plugins are mostly interested if
there is any error, not what specific error.

This reuses the existing `parse_conffile()` function with slight
adjustments.

Signed-off-by: Corubba Smith <corubba@gmx.de>
Signed-off-by: Florian Westphal <fw@strlen.de>
include/ulogd/ulogd.h
src/ulogd.c