defs: rework CONF_DIRS_NULSTR() macro
The macro is generically useful for putting together search paths, hence let's make it truly generic, by dropping the implicit ".d" appending it does, and leave that to the caller. Also rename it from CONF_DIRS_NULSTR() to CONF_PATHS_NULSTR(), since it's not strictly about dirs that way, but any kind of file system path. Also, mark CONF_DIR_SPLIT_USR() as internal macro by renaming it to _CONF_PATHS_SPLIT_USR() so that the leading underscore indicates that it's internal.
This commit is contained in:
@@ -95,8 +95,6 @@ static void signal_handler(int sig) {
|
||||
exiting = 1;
|
||||
}
|
||||
|
||||
#define BOOTCHART_CONF "/etc/systemd/bootchart.conf"
|
||||
|
||||
#define BOOTCHART_MAX (16*1024*1024)
|
||||
|
||||
static void parse_conf(void) {
|
||||
@@ -117,8 +115,8 @@ static void parse_conf(void) {
|
||||
{ NULL, NULL, NULL, 0, NULL }
|
||||
};
|
||||
|
||||
config_parse_many(BOOTCHART_CONF,
|
||||
CONF_DIRS_NULSTR("systemd/bootchart.conf"),
|
||||
config_parse_many(PKGSYSCONFDIR "/bootchart.conf",
|
||||
CONF_PATHS_NULSTR("systemd/bootchart.conf.d"),
|
||||
NULL, config_item_table_lookup, items, true, NULL);
|
||||
|
||||
if (init != NULL)
|
||||
|
||||
Reference in New Issue
Block a user