summaryrefslogtreecommitdiffstats
path: root/src/basic/exec-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-04-16 21:24:13 +0200
committerLennart Poettering <lennart@poettering.net>2018-05-24 17:01:57 +0200
commit3e36211be0b60e239792e6a4efb4a1e75365a3a8 (patch)
tree13ea878064111a290d580932f3b56e308e9c2be4 /src/basic/exec-util.c
parentfileio: make sure read_full_stream() works on memory-backed streams (diff)
downloadsystemd-3e36211be0b60e239792e6a4efb4a1e75365a3a8.tar.xz
systemd-3e36211be0b60e239792e6a4efb4a1e75365a3a8.zip
conf-files: beef up conf-files.[ch] a bit
This adds fozr new flags: - If CONF_FILES_DIRECTORY is specified conf_file_list() and friends will look for directories only. - Similar CONF_FILES_REGULAR means we'll look only for regular files. - If CONF_FILES_BASENAME is specified the resulting list will contain only the basenames of all discovered files or directories, not the full paths. - If CONF_FILES_FILTER_MASKED is specified the resulting list will have masked entries removed (i.e. those symlinked to /dev/null and suchlike) These four flags are useful for discovering portable service profile information. While we are at it, also improve a couple of other things: - More debug logging - use path_hash_ops instead of string_hash_ops when putting together the path lists
Diffstat (limited to 'src/basic/exec-util.c')
-rw-r--r--src/basic/exec-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/exec-util.c b/src/basic/exec-util.c
index d5d0edfb5f..e9203fe578 100644
--- a/src/basic/exec-util.c
+++ b/src/basic/exec-util.c
@@ -89,7 +89,7 @@ static int do_execute(
* If callbacks is nonnull, execution is serial. Otherwise, we default to parallel.
*/
- r = conf_files_list_strv(&paths, NULL, NULL, CONF_FILES_EXECUTABLE, (const char* const*) directories);
+ r = conf_files_list_strv(&paths, NULL, NULL, CONF_FILES_EXECUTABLE|CONF_FILES_REGULAR|CONF_FILES_FILTER_MASKED, (const char* const*) directories);
if (r < 0)
return r;