]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/shared/dropin.h
tree-wide: beautify remaining copyright statements
[thirdparty/systemd.git] / src / shared / dropin.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
29686440
ZJS
2#pragma once
3
4/***
96b2fb93 5 Copyright © 2014 Zbigniew Jędrzejewski-Szmek
29686440
ZJS
6***/
7
a8fbdf54 8#include "hashmap.h"
f5a4b0d3 9#include "macro.h"
1a7f1b38
ZJS
10#include "set.h"
11#include "unit-name.h"
f5a4b0d3 12
8eea8687 13int drop_in_file(const char *dir, const char *unit, unsigned level,
29686440
ZJS
14 const char *name, char **_p, char **_q);
15
8eea8687 16int write_drop_in(const char *dir, const char *unit, unsigned level,
29686440
ZJS
17 const char *name, const char *data);
18
8eea8687 19int write_drop_in_format(const char *dir, const char *unit, unsigned level,
f5a4b0d3 20 const char *name, const char *format, ...) _printf_(5, 6);
1a7f1b38 21
1a7f1b38 22int unit_file_find_dropin_paths(
17e78d18 23 const char *original_root,
1a7f1b38
ZJS
24 char **lookup_path,
25 Set *unit_path_cache,
95778782
ZJS
26 const char *dir_suffix,
27 const char *file_suffix,
1a7f1b38
ZJS
28 Set *names,
29 char ***paths);
95778782
ZJS
30
31static inline int unit_file_find_dropin_conf_paths(
32 const char *original_root,
33 char **lookup_path,
34 Set *unit_path_cache,
35 Set *names,
36 char ***paths) {
b119facd 37
95778782
ZJS
38 return unit_file_find_dropin_paths(original_root,
39 lookup_path,
40 unit_path_cache,
41 ".d", ".conf",
42 names, paths);
43}