]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/core/load-fragment.h
Merge pull request #18886 from anitazha/shutdownconsole
[thirdparty/systemd.git] / src / core / load-fragment.h
CommitLineData
db9ecf05 1/* SPDX-License-Identifier: LGPL-2.1-or-later */
c2f1db8f 2#pragma once
3efd4195 3
a2106925 4#include "conf-parser.h"
87f0e418 5#include "unit.h"
3efd4195 6
a07a7324
FS
7/* Config-parsing helpers relevant only for sources under src/core/ */
8int parse_crash_chvt(const char *value, int *data);
9int parse_confirm_spawn(const char *value, char **console);
10
3efd4195
LP
11/* Read service data from .desktop file style configuration fragments */
12
e537352b
LP
13int unit_load_fragment(Unit *u);
14
15void unit_dump_config_items(FILE *f);
3efd4195 16
a2106925
LP
17CONFIG_PARSER_PROTOTYPE(config_parse_unit_deps);
18CONFIG_PARSER_PROTOTYPE(config_parse_obsolete_unit_deps);
19CONFIG_PARSER_PROTOTYPE(config_parse_unit_string_printf);
20CONFIG_PARSER_PROTOTYPE(config_parse_unit_strv_printf);
21CONFIG_PARSER_PROTOTYPE(config_parse_unit_path_printf);
22CONFIG_PARSER_PROTOTYPE(config_parse_unit_path_strv_printf);
23CONFIG_PARSER_PROTOTYPE(config_parse_documentation);
24CONFIG_PARSER_PROTOTYPE(config_parse_socket_listen);
25CONFIG_PARSER_PROTOTYPE(config_parse_socket_protocol);
26CONFIG_PARSER_PROTOTYPE(config_parse_socket_bind);
27CONFIG_PARSER_PROTOTYPE(config_parse_exec_nice);
28CONFIG_PARSER_PROTOTYPE(config_parse_exec_oom_score_adjust);
ad21e542 29CONFIG_PARSER_PROTOTYPE(config_parse_exec_coredump_filter);
a2106925
LP
30CONFIG_PARSER_PROTOTYPE(config_parse_exec);
31CONFIG_PARSER_PROTOTYPE(config_parse_service_timeout);
dc653bf4 32CONFIG_PARSER_PROTOTYPE(config_parse_service_timeout_abort);
bf760801 33CONFIG_PARSER_PROTOTYPE(config_parse_service_timeout_failure_mode);
a2106925 34CONFIG_PARSER_PROTOTYPE(config_parse_service_type);
cb0e818f 35CONFIG_PARSER_PROTOTYPE(config_parse_service_exit_type);
a2106925
LP
36CONFIG_PARSER_PROTOTYPE(config_parse_service_restart);
37CONFIG_PARSER_PROTOTYPE(config_parse_socket_bindtodevice);
38CONFIG_PARSER_PROTOTYPE(config_parse_exec_output);
39CONFIG_PARSER_PROTOTYPE(config_parse_exec_input);
40CONFIG_PARSER_PROTOTYPE(config_parse_exec_input_text);
41CONFIG_PARSER_PROTOTYPE(config_parse_exec_input_data);
42CONFIG_PARSER_PROTOTYPE(config_parse_exec_io_class);
43CONFIG_PARSER_PROTOTYPE(config_parse_exec_io_priority);
44CONFIG_PARSER_PROTOTYPE(config_parse_exec_cpu_sched_policy);
45CONFIG_PARSER_PROTOTYPE(config_parse_exec_cpu_sched_prio);
46CONFIG_PARSER_PROTOTYPE(config_parse_exec_cpu_affinity);
5e98086d 47CONFIG_PARSER_PROTOTYPE(config_parse_exec_mount_apivfs);
a2106925 48CONFIG_PARSER_PROTOTYPE(config_parse_exec_secure_bits);
18d73705 49CONFIG_PARSER_PROTOTYPE(config_parse_root_image_options);
0389f4fa 50CONFIG_PARSER_PROTOTYPE(config_parse_exec_root_hash);
d4d55b0d 51CONFIG_PARSER_PROTOTYPE(config_parse_exec_root_hash_sig);
a2106925 52CONFIG_PARSER_PROTOTYPE(config_parse_capability_set);
a2106925
LP
53CONFIG_PARSER_PROTOTYPE(config_parse_exec_mount_flags);
54CONFIG_PARSER_PROTOTYPE(config_parse_timer);
55CONFIG_PARSER_PROTOTYPE(config_parse_trigger_unit);
56CONFIG_PARSER_PROTOTYPE(config_parse_path_spec);
57CONFIG_PARSER_PROTOTYPE(config_parse_socket_service);
58CONFIG_PARSER_PROTOTYPE(config_parse_service_sockets);
59CONFIG_PARSER_PROTOTYPE(config_parse_unit_env_file);
60CONFIG_PARSER_PROTOTYPE(config_parse_ip_tos);
61CONFIG_PARSER_PROTOTYPE(config_parse_unit_condition_path);
62CONFIG_PARSER_PROTOTYPE(config_parse_unit_condition_string);
a2106925
LP
63CONFIG_PARSER_PROTOTYPE(config_parse_kill_mode);
64CONFIG_PARSER_PROTOTYPE(config_parse_notify_access);
65CONFIG_PARSER_PROTOTYPE(config_parse_emergency_action);
66CONFIG_PARSER_PROTOTYPE(config_parse_unit_requires_mounts_for);
67CONFIG_PARSER_PROTOTYPE(config_parse_syscall_filter);
68CONFIG_PARSER_PROTOTYPE(config_parse_syscall_archs);
69CONFIG_PARSER_PROTOTYPE(config_parse_syscall_errno);
9df2cdd8 70CONFIG_PARSER_PROTOTYPE(config_parse_syscall_log);
a2106925
LP
71CONFIG_PARSER_PROTOTYPE(config_parse_environ);
72CONFIG_PARSER_PROTOTYPE(config_parse_pass_environ);
73CONFIG_PARSER_PROTOTYPE(config_parse_unset_environ);
74CONFIG_PARSER_PROTOTYPE(config_parse_unit_slice);
984faf29 75CONFIG_PARSER_PROTOTYPE(config_parse_cg_weight);
a2106925
LP
76CONFIG_PARSER_PROTOTYPE(config_parse_cpu_shares);
77CONFIG_PARSER_PROTOTYPE(config_parse_memory_limit);
78CONFIG_PARSER_PROTOTYPE(config_parse_tasks_max);
79CONFIG_PARSER_PROTOTYPE(config_parse_delegate);
4d824a4e
AZ
80CONFIG_PARSER_PROTOTYPE(config_parse_managed_oom_mode);
81CONFIG_PARSER_PROTOTYPE(config_parse_managed_oom_mem_pressure_limit);
4e806bfa 82CONFIG_PARSER_PROTOTYPE(config_parse_managed_oom_preference);
a2106925
LP
83CONFIG_PARSER_PROTOTYPE(config_parse_device_policy);
84CONFIG_PARSER_PROTOTYPE(config_parse_device_allow);
6ae4283c 85CONFIG_PARSER_PROTOTYPE(config_parse_io_device_latency);
a2106925
LP
86CONFIG_PARSER_PROTOTYPE(config_parse_io_device_weight);
87CONFIG_PARSER_PROTOTYPE(config_parse_io_limit);
88CONFIG_PARSER_PROTOTYPE(config_parse_blockio_weight);
89CONFIG_PARSER_PROTOTYPE(config_parse_blockio_device_weight);
90CONFIG_PARSER_PROTOTYPE(config_parse_blockio_bandwidth);
a2106925
LP
91CONFIG_PARSER_PROTOTYPE(config_parse_job_mode);
92CONFIG_PARSER_PROTOTYPE(config_parse_job_mode_isolate);
93CONFIG_PARSER_PROTOTYPE(config_parse_exec_selinux_context);
94CONFIG_PARSER_PROTOTYPE(config_parse_exec_apparmor_profile);
95CONFIG_PARSER_PROTOTYPE(config_parse_exec_smack_process_label);
96CONFIG_PARSER_PROTOTYPE(config_parse_address_families);
97CONFIG_PARSER_PROTOTYPE(config_parse_runtime_preserve_mode);
98CONFIG_PARSER_PROTOTYPE(config_parse_exec_directories);
bb0c0d6f
LP
99CONFIG_PARSER_PROTOTYPE(config_parse_set_credential);
100CONFIG_PARSER_PROTOTYPE(config_parse_load_credential);
a2106925
LP
101CONFIG_PARSER_PROTOTYPE(config_parse_set_status);
102CONFIG_PARSER_PROTOTYPE(config_parse_namespace_path_strv);
103CONFIG_PARSER_PROTOTYPE(config_parse_temporary_filesystems);
a2106925 104CONFIG_PARSER_PROTOTYPE(config_parse_cpu_quota);
0b8d3075
ZJS
105CONFIG_PARSER_PROTOTYPE(config_parse_allowed_cpus);
106CONFIG_PARSER_PROTOTYPE(config_parse_allowed_mems);
a2106925
LP
107CONFIG_PARSER_PROTOTYPE(config_parse_protect_home);
108CONFIG_PARSER_PROTOTYPE(config_parse_protect_system);
109CONFIG_PARSER_PROTOTYPE(config_parse_bus_name);
110CONFIG_PARSER_PROTOTYPE(config_parse_exec_utmp_mode);
111CONFIG_PARSER_PROTOTYPE(config_parse_working_directory);
112CONFIG_PARSER_PROTOTYPE(config_parse_fdname);
113CONFIG_PARSER_PROTOTYPE(config_parse_sec_fix_0);
ae480f0b
ZJS
114CONFIG_PARSER_PROTOTYPE(config_parse_user_group_compat);
115CONFIG_PARSER_PROTOTYPE(config_parse_user_group_strv_compat);
a2106925
LP
116CONFIG_PARSER_PROTOTYPE(config_parse_restrict_namespaces);
117CONFIG_PARSER_PROTOTYPE(config_parse_bind_paths);
118CONFIG_PARSER_PROTOTYPE(config_parse_exec_keyring_mode);
4e399953
LP
119CONFIG_PARSER_PROTOTYPE(config_parse_protect_proc);
120CONFIG_PARSER_PROTOTYPE(config_parse_proc_subset);
a2106925
LP
121CONFIG_PARSER_PROTOTYPE(config_parse_job_timeout_sec);
122CONFIG_PARSER_PROTOTYPE(config_parse_job_running_timeout_sec);
123CONFIG_PARSER_PROTOTYPE(config_parse_log_extra_fields);
91dd5f7c 124CONFIG_PARSER_PROTOTYPE(config_parse_log_namespace);
a2106925 125CONFIG_PARSER_PROTOTYPE(config_parse_collect_mode);
a9353a5c 126CONFIG_PARSER_PROTOTYPE(config_parse_pid_file);
7af67e9a 127CONFIG_PARSER_PROTOTYPE(config_parse_exit_status);
c72703e2 128CONFIG_PARSER_PROTOTYPE(config_parse_disable_controllers);
afcfaa69 129CONFIG_PARSER_PROTOTYPE(config_parse_oom_policy);
b070c7c0
MS
130CONFIG_PARSER_PROTOTYPE(config_parse_numa_policy);
131CONFIG_PARSER_PROTOTYPE(config_parse_numa_mask);
fab34748 132CONFIG_PARSER_PROTOTYPE(config_parse_ip_filter_bpf_progs);
a07a7324
FS
133CONFIG_PARSER_PROTOTYPE(config_parse_cpu_affinity2);
134CONFIG_PARSER_PROTOTYPE(config_parse_show_status);
6327aa9f 135CONFIG_PARSER_PROTOTYPE(config_parse_status_unit_format);
a07a7324
FS
136CONFIG_PARSER_PROTOTYPE(config_parse_output_restricted);
137CONFIG_PARSER_PROTOTYPE(config_parse_crash_chvt);
138CONFIG_PARSER_PROTOTYPE(config_parse_timeout_abort);
eb34a981 139CONFIG_PARSER_PROTOTYPE(config_parse_swap_priority);
b3d13314 140CONFIG_PARSER_PROTOTYPE(config_parse_mount_images);
9b191525 141CONFIG_PARSER_PROTOTYPE(config_parse_socket_timestamping);
93f59701 142CONFIG_PARSER_PROTOTYPE(config_parse_extension_images);
f975e971
LP
143
144/* gperf prototypes */
c9f7b4d3 145const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
f975e971 146extern const char load_fragment_gperf_nulstr[];