config-parser: Add list of drop-in files as return argument of config_parse_many

This will be used to save the list of drop-in files for each partition
This commit is contained in:
Richard Phibel
2022-08-12 12:48:29 +02:00
committed by Daan De Meyer
parent 65c2ad985a
commit ead3a3fc87
8 changed files with 21 additions and 7 deletions
+10 -2
View File
@@ -588,7 +588,8 @@ int config_parse_many(
const void *table,
ConfigParseFlags flags,
void *userdata,
Hashmap **ret_stats_by_path) {
Hashmap **ret_stats_by_path,
char ***ret_dropin_files) {
_cleanup_strv_free_ char **files = NULL;
int r;
@@ -602,7 +603,14 @@ int config_parse_many(
if (r < 0)
return r;
return config_parse_many_files(conf_files, files, sections, lookup, table, flags, userdata, ret_stats_by_path);
r = config_parse_many_files(conf_files, files, sections, lookup, table, flags, userdata, ret_stats_by_path);
if (r < 0)
return r;
if (ret_dropin_files)
*ret_dropin_files = TAKE_PTR(files);
return 0;
}
static int dropins_get_stats_by_path(