]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
29686440 ZJS |
2 | #pragma once |
3 | ||
a8fbdf54 | 4 | #include "hashmap.h" |
f5a4b0d3 | 5 | #include "macro.h" |
1a7f1b38 ZJS |
6 | #include "set.h" |
7 | #include "unit-name.h" | |
f5a4b0d3 | 8 | |
8eea8687 | 9 | int drop_in_file(const char *dir, const char *unit, unsigned level, |
29686440 ZJS |
10 | const char *name, char **_p, char **_q); |
11 | ||
8eea8687 | 12 | int write_drop_in(const char *dir, const char *unit, unsigned level, |
29686440 ZJS |
13 | const char *name, const char *data); |
14 | ||
8eea8687 | 15 | int write_drop_in_format(const char *dir, const char *unit, unsigned level, |
f5a4b0d3 | 16 | const char *name, const char *format, ...) _printf_(5, 6); |
1a7f1b38 | 17 | |
1a7f1b38 | 18 | int unit_file_find_dropin_paths( |
17e78d18 | 19 | const char *original_root, |
1a7f1b38 ZJS |
20 | char **lookup_path, |
21 | Set *unit_path_cache, | |
95778782 ZJS |
22 | const char *dir_suffix, |
23 | const char *file_suffix, | |
1a7f1b38 ZJS |
24 | Set *names, |
25 | char ***paths); | |
95778782 ZJS |
26 | |
27 | static inline int unit_file_find_dropin_conf_paths( | |
28 | const char *original_root, | |
29 | char **lookup_path, | |
30 | Set *unit_path_cache, | |
31 | Set *names, | |
32 | char ***paths) { | |
b119facd | 33 | |
95778782 ZJS |
34 | return unit_file_find_dropin_paths(original_root, |
35 | lookup_path, | |
36 | unit_path_cache, | |
37 | ".d", ".conf", | |
38 | names, paths); | |
39 | } |