summaryrefslogtreecommitdiff
path: root/src/shared/conf-parser.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-10-25 11:13:27 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-10-27 19:49:55 +0900
commit8524db502134135d96219ecd6df0d0fc5c475b9d (patch)
tree88f43654c31a138f9f4cfa3a7883e668a56f0feb /src/shared/conf-parser.h
parentf3f1172cf6302cffbffe93f2c21323348c33938f (diff)
downloadsystemd-8524db502134135d96219ecd6df0d0fc5c475b9d.tar.gz
conf-parse: make config_parse_many() optionally save 'struct stat' for each file
Fixes #21113.
Diffstat (limited to 'src/shared/conf-parser.h')
-rw-r--r--src/shared/conf-parser.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h
index c3a138274d..f893a53aa0 100644
--- a/src/shared/conf-parser.h
+++ b/src/shared/conf-parser.h
@@ -6,8 +6,10 @@
#include <stddef.h>
#include <stdio.h>
#include <syslog.h>
+#include <sys/stat.h>
#include "alloc-util.h"
+#include "hashmap.h"
#include "log.h"
#include "macro.h"
#include "time-util.h"
@@ -89,7 +91,7 @@ int config_parse(
const void *table,
ConfigParseFlags flags,
void *userdata,
- usec_t *latest_mtime); /* input/output, possibly NULL */
+ struct stat *ret_stat); /* possibly NULL */
int config_parse_many_nulstr(
const char *conf_file, /* possibly NULL */
@@ -99,7 +101,7 @@ int config_parse_many_nulstr(
const void *table,
ConfigParseFlags flags,
void *userdata,
- usec_t *ret_mtime); /* possibly NULL */
+ Hashmap **ret_stats_by_path); /* possibly NULL */
int config_parse_many(
const char* const* conf_files, /* possibly empty */
@@ -110,7 +112,7 @@ int config_parse_many(
const void *table,
ConfigParseFlags flags,
void *userdata,
- usec_t *ret_mtime); /* possibly NULL */
+ Hashmap **ret_stats_by_path); /* possibly NULL */
CONFIG_PARSER_PROTOTYPE(config_parse_int);
CONFIG_PARSER_PROTOTYPE(config_parse_unsigned);