diff options
author | Josh Triplett <josh@joshtriplett.org> | 2014-10-29 05:02:56 -0700 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-11-26 19:11:37 -0500 |
commit | 7f0a55d4325f7df91f91b3b818f61f97d78df14a (patch) | |
tree | f88b96f4a0002b49749d78622fd174d54062e9f8 /src/sysctl | |
parent | 3d82301321afdcc4f2f8786883bd15b1a64c6e83 (diff) |
Introduce CONF_DIRS_NULSTR helper to define standard conf dirs
Several different systemd tools define a nulstr containing a standard
series of configuration file directories, in /etc, /run, /usr/local/lib,
/usr/lib, and (#ifdef HAVE_SPLIT_USR) /lib. Factor that logic out into
a new helper macro, CONF_DIRS_NULSTR.
Diffstat (limited to 'src/sysctl')
-rw-r--r-- | src/sysctl/sysctl.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index 809e59b71f..edebe501d1 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -38,15 +38,7 @@ static char **arg_prefixes = NULL; -static const char conf_file_dirs[] = - "/etc/sysctl.d\0" - "/run/sysctl.d\0" - "/usr/local/lib/sysctl.d\0" - "/usr/lib/sysctl.d\0" -#ifdef HAVE_SPLIT_USR - "/lib/sysctl.d\0" -#endif - ; +static const char conf_file_dirs[] = CONF_DIRS_NULSTR("sysctl"); static char* normalize_sysctl(char *s) { char *n; |