conf-parser: add support for .d directories

This allows a configuration scheme where after loading configuration
from "somefile", the parser loads configuration from files in
directory "somefile.d". This feature needs to be enabled on a per-file
basis, though, and this patch doesn't yet enable the feature for any
files.
This commit is contained in:
Tanu Kaskinen 2015-12-07 23:22:41 +02:00 committed by David Henningsson
parent d97460045c
commit 1d7ce90139
6 changed files with 52 additions and 8 deletions

View file

@ -2594,7 +2594,7 @@ pa_alsa_path* pa_alsa_path_new(const char *paths_dir, const char *fname, pa_alsa
fn = pa_maybe_prefix_path(fname, paths_dir);
r = pa_config_parse(fn, NULL, items, p->proplist, p);
r = pa_config_parse(fn, NULL, items, p->proplist, false, p);
pa_xfree(fn);
if (r < 0)
@ -4411,7 +4411,7 @@ pa_alsa_profile_set* pa_alsa_profile_set_new(const char *fname, const pa_channel
pa_run_from_build_tree() ? PA_SRCDIR "/modules/alsa/mixer/profile-sets/" :
PA_ALSA_PROFILE_SETS_DIR);
r = pa_config_parse(fn, NULL, items, NULL, ps);
r = pa_config_parse(fn, NULL, items, NULL, false, ps);
pa_xfree(fn);
if (r < 0)

View file

@ -204,7 +204,7 @@ static void update_rule(struct rule *r) {
table[0].data = &r->application_name;
table[1].data = &r->icon_name;
if (pa_config_parse(fn, NULL, table, NULL, r) < 0)
if (pa_config_parse(fn, NULL, table, NULL, false, r) < 0)
pa_log_warn("Failed to parse .desktop file %s.", fn);
pa_xfree(fn);