]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
c76dd733 LP |
2 | |
3 | #include "conf-parser.h" | |
4 | #include "def.h" | |
5 | #include "home-util.h" | |
6 | #include "homed-conf.h" | |
7 | ||
8 | int manager_parse_config_file(Manager *m) { | |
9 | int r; | |
10 | ||
11 | assert(m); | |
12 | ||
4f9ff96a LP |
13 | r = config_parse_many_nulstr( |
14 | PKGSYSCONFDIR "/homed.conf", | |
15 | CONF_PATHS_NULSTR("systemd/homed.conf.d"), | |
16 | "Home\0", | |
17 | config_item_perf_lookup, homed_gperf_lookup, | |
18 | CONFIG_PARSE_WARN, | |
19 | m, | |
20 | NULL); | |
c76dd733 LP |
21 | if (r < 0) |
22 | return r; | |
23 | ||
24 | return 0; | |
25 | ||
26 | } | |
27 | ||
28 | DEFINE_CONFIG_PARSE_ENUM(config_parse_default_storage, user_storage, UserStorage, "Failed to parse default storage setting"); | |
29 | ||
30 | int config_parse_default_file_system_type( | |
31 | const char *unit, | |
32 | const char *filename, | |
33 | unsigned line, | |
34 | const char *section, | |
35 | unsigned section_line, | |
36 | const char *lvalue, | |
37 | int ltype, | |
38 | const char *rvalue, | |
39 | void *data, | |
40 | void *userdata) { | |
41 | ||
99534007 | 42 | char **s = ASSERT_PTR(data); |
c76dd733 LP |
43 | |
44 | assert(rvalue); | |
c76dd733 LP |
45 | |
46 | if (!isempty(rvalue) && !supported_fstype(rvalue)) { | |
144fb165 | 47 | log_syntax(unit, LOG_WARNING, filename, line, 0, "Unsupported file system, ignoring: %s", rvalue); |
c76dd733 LP |
48 | return 0; |
49 | } | |
50 | ||
51 | return free_and_strdup_warn(s, empty_to_null(rvalue)); | |
52 | ||
53 | } |