diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-02-08 14:50:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-08 14:50:56 +0100 |
commit | b6f08ecda90b5ccb6c9c09e5976a627f5918dc0b (patch) | |
tree | 27616a7d5adad15e007d3f01d291b20b76d75983 /src/shared/dropin.h | |
parent | a48dd3475bb0d5f3a88922cdce09ee8c63b6c0b8 (diff) | |
parent | fbc42f133232fb92140a8039b2d643f6f0b63889 (diff) |
Merge pull request #5231 from keszybz/mask-wants
Mask individual .wants/.requires symlinks
Diffstat (limited to 'src/shared/dropin.h')
-rw-r--r-- | src/shared/dropin.h | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/src/shared/dropin.h b/src/shared/dropin.h index 761b250886..a2b8cdce61 100644 --- a/src/shared/dropin.h +++ b/src/shared/dropin.h @@ -33,31 +33,24 @@ int write_drop_in(const char *dir, const char *unit, unsigned level, int write_drop_in_format(const char *dir, const char *unit, unsigned level, const char *name, const char *format, ...) _printf_(5, 6); -/** - * This callback will be called for each directory entry @entry, - * with @filepath being the full path to the entry. - * - * If return value is negative, loop will be aborted. - */ -typedef int (*dependency_consumer_t)(UnitDependency dependency, - const char *entry, - const char* filepath, - void *arg); - -int unit_file_process_dir( - const char *original_root, - Set * unit_path_cache, - const char *unit_path, - const char *name, - const char *suffix, - UnitDependency dependency, - dependency_consumer_t consumer, - void *arg, - char ***strv); - int unit_file_find_dropin_paths( const char *original_root, char **lookup_path, Set *unit_path_cache, + const char *dir_suffix, + const char *file_suffix, Set *names, char ***paths); + +static inline int unit_file_find_dropin_conf_paths( + const char *original_root, + char **lookup_path, + Set *unit_path_cache, + Set *names, + char ***paths) { + return unit_file_find_dropin_paths(original_root, + lookup_path, + unit_path_cache, + ".d", ".conf", + names, paths); +} |