#include "terminal-util.h"
#include "util.h"
-static char **config_dirs = CONF_PATHS_STRV("binfmt.d");
static bool arg_cat_config = false;
static int delete_rule(const char *rule) {
assert(path);
- r = search_and_fopen(path, "re", NULL, (const char**) config_dirs, &f);
+ r = search_and_fopen(path, "re", NULL, (const char**) CONF_PATHS_STRV("binfmt.d"), &f);
if (r < 0) {
if (ignore_enoent && r == -ENOENT)
return 0;
_cleanup_strv_free_ char **files = NULL;
char **f;
- r = conf_files_list_strv(&files, ".conf", NULL, 0, (const char**) config_dirs);
+ r = conf_files_list_strv(&files, ".conf", NULL, 0, (const char**) CONF_PATHS_STRV("binfmt.d"));
if (r < 0) {
log_error_errno(r, "Failed to enumerate binfmt.d files: %m");
goto finish;
static char **arg_prefixes = NULL;
static bool arg_cat_config = false;
-static char **config_dirs = CONF_PATHS_STRV("sysctl.d");
-
static int apply_all(OrderedHashmap *sysctl_options) {
char *property, *value;
Iterator i;
assert(path);
- r = search_and_fopen(path, "re", NULL, (const char**) config_dirs, &f);
+ r = search_and_fopen(path, "re", NULL, (const char**) CONF_PATHS_STRV("sysctl.d"), &f);
if (r < 0) {
if (ignore_enoent && r == -ENOENT)
return 0;
_cleanup_strv_free_ char **files = NULL;
char **f;
- r = conf_files_list_strv(&files, ".conf", NULL, 0, (const char**) config_dirs);
+ r = conf_files_list_strv(&files, ".conf", NULL, 0, (const char**) CONF_PATHS_STRV("sysctl.d"));
if (r < 0) {
log_error_errno(r, "Failed to enumerate sysctl.d files: %m");
goto finish;
static const char *arg_replace = NULL;
static bool arg_inline = false;
-static char **config_dirs = CONF_PATHS_STRV("sysusers.d");
-
static OrderedHashmap *users = NULL, *groups = NULL;
static OrderedHashmap *todo_uids = NULL, *todo_gids = NULL;
static OrderedHashmap *members = NULL;
if (streq(fn, "-"))
f = stdin;
else {
- r = search_and_fopen(fn, "re", arg_root, (const char**) config_dirs, &rf);
+ r = search_and_fopen(fn, "re", arg_root, (const char**) CONF_PATHS_STRV("sysusers.d"), &rf);
if (r < 0) {
if (ignore_enoent && r == -ENOENT)
return 0;
_cleanup_free_ char *replace_file = NULL;
int r;
- r = conf_files_list_with_replacement(arg_root, config_dirs, arg_replace, &files, NULL);
+ r = conf_files_list_with_replacement(arg_root, CONF_PATHS_STRV("sysusers.d"), arg_replace, &files, NULL);
if (r < 0)
return r;
char **f;
int r;
- r = conf_files_list_with_replacement(arg_root, config_dirs, arg_replace, &files, &p);
+ r = conf_files_list_with_replacement(arg_root, CONF_PATHS_STRV("sysusers.d"), arg_replace, &files, &p);
if (r < 0)
return r;