]>
Commit | Line | Data |
---|---|---|
29686440 ZJS |
1 | #pragma once |
2 | ||
3 | /*** | |
4 | This file is part of systemd. | |
5 | ||
6 | Copyright 2014 Zbigniew Jędrzejewski-Szmek | |
7 | ||
8 | systemd is free software; you can redistribute it and/or modify it | |
9 | under the terms of the GNU Lesser General Public License as published by | |
10 | the Free Software Foundation; either version 2.1 of the License, or | |
11 | (at your option) any later version. | |
12 | ||
13 | systemd is distributed in the hope that it will be useful, but | |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 | Lesser General Public License for more details. | |
17 | ||
18 | You should have received a copy of the GNU Lesser General Public License | |
19 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
20 | ***/ | |
21 | ||
a8fbdf54 | 22 | #include "hashmap.h" |
f5a4b0d3 | 23 | #include "macro.h" |
1a7f1b38 ZJS |
24 | #include "set.h" |
25 | #include "unit-name.h" | |
f5a4b0d3 | 26 | |
8eea8687 | 27 | int drop_in_file(const char *dir, const char *unit, unsigned level, |
29686440 ZJS |
28 | const char *name, char **_p, char **_q); |
29 | ||
8eea8687 | 30 | int write_drop_in(const char *dir, const char *unit, unsigned level, |
29686440 ZJS |
31 | const char *name, const char *data); |
32 | ||
8eea8687 | 33 | int write_drop_in_format(const char *dir, const char *unit, unsigned level, |
f5a4b0d3 | 34 | const char *name, const char *format, ...) _printf_(5, 6); |
1a7f1b38 | 35 | |
1a7f1b38 | 36 | int unit_file_find_dropin_paths( |
17e78d18 | 37 | const char *original_root, |
1a7f1b38 ZJS |
38 | char **lookup_path, |
39 | Set *unit_path_cache, | |
95778782 ZJS |
40 | const char *dir_suffix, |
41 | const char *file_suffix, | |
1a7f1b38 ZJS |
42 | Set *names, |
43 | char ***paths); | |
95778782 ZJS |
44 | |
45 | static inline int unit_file_find_dropin_conf_paths( | |
46 | const char *original_root, | |
47 | char **lookup_path, | |
48 | Set *unit_path_cache, | |
49 | Set *names, | |
50 | char ***paths) { | |
51 | return unit_file_find_dropin_paths(original_root, | |
52 | lookup_path, | |
53 | unit_path_cache, | |
54 | ".d", ".conf", | |
55 | names, paths); | |
56 | } |