network: also read mtime of drop-in configs

Fixes #15521.
This commit is contained in:
Yu Watanabe
2020-06-01 17:03:40 +09:00
parent c4473dec34
commit 9f83091e3c
5 changed files with 31 additions and 7 deletions
+10 -2
View File
@@ -493,7 +493,8 @@ int config_parse_many(
ConfigItemLookup lookup,
const void *table,
ConfigParseFlags flags,
void *userdata) {
void *userdata,
char ***ret_dropins) {
_cleanup_strv_free_ char **dropin_dirs = NULL;
_cleanup_strv_free_ char **files = NULL;
@@ -509,7 +510,14 @@ int config_parse_many(
if (r < 0)
return r;
return config_parse_many_files(conf_file, files, sections, lookup, table, flags, userdata);
r = config_parse_many_files(conf_file, files, sections, lookup, table, flags, userdata);
if (r < 0)
return r;
if (ret_dropins)
*ret_dropins = TAKE_PTR(files);
return 0;
}
#define DEFINE_PARSER(type, vartype, conv_func) \
+2 -1
View File
@@ -107,7 +107,8 @@ int config_parse_many(
ConfigItemLookup lookup,
const void *table,
ConfigParseFlags flags,
void *userdata);
void *userdata,
char ***ret_dropins); /* possibly NULL */
CONFIG_PARSER_PROTOTYPE(config_parse_int);
CONFIG_PARSER_PROTOTYPE(config_parse_unsigned);