]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/core/load-fragment.h
ci: enable arm64 runner for build/unit jobs
[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
836e4e7e 4#include "core-forward.h"
3efd4195 5
88022148
DDM
6/* These functions are declared in the header to make them accessible to unit tests. */
7bool contains_instance_specifier_superset(const char *s);
8int unit_is_likely_recursive_template_dependency(Unit *u, const char *name, const char *format);
9
a07a7324
FS
10/* Config-parsing helpers relevant only for sources under src/core/ */
11int parse_crash_chvt(const char *value, int *data);
12int parse_confirm_spawn(const char *value, char **console);
13
3efd4195
LP
14/* Read service data from .desktop file style configuration fragments */
15
e537352b
LP
16int unit_load_fragment(Unit *u);
17
18void unit_dump_config_items(FILE *f);
3efd4195 19
a2106925
LP
20CONFIG_PARSER_PROTOTYPE(config_parse_unit_deps);
21CONFIG_PARSER_PROTOTYPE(config_parse_obsolete_unit_deps);
22CONFIG_PARSER_PROTOTYPE(config_parse_unit_string_printf);
b7ad4778 23CONFIG_PARSER_PROTOTYPE(config_parse_reboot_parameter);
a2106925
LP
24CONFIG_PARSER_PROTOTYPE(config_parse_unit_strv_printf);
25CONFIG_PARSER_PROTOTYPE(config_parse_unit_path_printf);
8c35c10d 26CONFIG_PARSER_PROTOTYPE(config_parse_colon_separated_paths);
a2106925
LP
27CONFIG_PARSER_PROTOTYPE(config_parse_unit_path_strv_printf);
28CONFIG_PARSER_PROTOTYPE(config_parse_documentation);
29CONFIG_PARSER_PROTOTYPE(config_parse_socket_listen);
30CONFIG_PARSER_PROTOTYPE(config_parse_socket_protocol);
31CONFIG_PARSER_PROTOTYPE(config_parse_socket_bind);
32CONFIG_PARSER_PROTOTYPE(config_parse_exec_nice);
33CONFIG_PARSER_PROTOTYPE(config_parse_exec_oom_score_adjust);
ad21e542 34CONFIG_PARSER_PROTOTYPE(config_parse_exec_coredump_filter);
a2106925
LP
35CONFIG_PARSER_PROTOTYPE(config_parse_exec);
36CONFIG_PARSER_PROTOTYPE(config_parse_service_timeout);
dc653bf4 37CONFIG_PARSER_PROTOTYPE(config_parse_service_timeout_abort);
bf760801 38CONFIG_PARSER_PROTOTYPE(config_parse_service_timeout_failure_mode);
a2106925 39CONFIG_PARSER_PROTOTYPE(config_parse_service_type);
596e4470 40CONFIG_PARSER_PROTOTYPE(config_parse_service_exit_type);
a2106925 41CONFIG_PARSER_PROTOTYPE(config_parse_service_restart);
e568fea9 42CONFIG_PARSER_PROTOTYPE(config_parse_service_restart_mode);
a2106925
LP
43CONFIG_PARSER_PROTOTYPE(config_parse_socket_bindtodevice);
44CONFIG_PARSER_PROTOTYPE(config_parse_exec_output);
45CONFIG_PARSER_PROTOTYPE(config_parse_exec_input);
46CONFIG_PARSER_PROTOTYPE(config_parse_exec_input_text);
47CONFIG_PARSER_PROTOTYPE(config_parse_exec_input_data);
48CONFIG_PARSER_PROTOTYPE(config_parse_exec_io_class);
49CONFIG_PARSER_PROTOTYPE(config_parse_exec_io_priority);
50CONFIG_PARSER_PROTOTYPE(config_parse_exec_cpu_sched_policy);
51CONFIG_PARSER_PROTOTYPE(config_parse_exec_cpu_sched_prio);
52CONFIG_PARSER_PROTOTYPE(config_parse_exec_cpu_affinity);
5e98086d 53CONFIG_PARSER_PROTOTYPE(config_parse_exec_mount_apivfs);
a2106925 54CONFIG_PARSER_PROTOTYPE(config_parse_exec_secure_bits);
18d73705 55CONFIG_PARSER_PROTOTYPE(config_parse_root_image_options);
0389f4fa 56CONFIG_PARSER_PROTOTYPE(config_parse_exec_root_hash);
d4d55b0d 57CONFIG_PARSER_PROTOTYPE(config_parse_exec_root_hash_sig);
a2106925 58CONFIG_PARSER_PROTOTYPE(config_parse_capability_set);
874cdcbc 59CONFIG_PARSER_PROTOTYPE(config_parse_exec_mount_propagation_flag);
a2106925
LP
60CONFIG_PARSER_PROTOTYPE(config_parse_timer);
61CONFIG_PARSER_PROTOTYPE(config_parse_trigger_unit);
62CONFIG_PARSER_PROTOTYPE(config_parse_path_spec);
63CONFIG_PARSER_PROTOTYPE(config_parse_socket_service);
64CONFIG_PARSER_PROTOTYPE(config_parse_service_sockets);
65CONFIG_PARSER_PROTOTYPE(config_parse_unit_env_file);
66CONFIG_PARSER_PROTOTYPE(config_parse_ip_tos);
67CONFIG_PARSER_PROTOTYPE(config_parse_unit_condition_path);
68CONFIG_PARSER_PROTOTYPE(config_parse_unit_condition_string);
a2106925
LP
69CONFIG_PARSER_PROTOTYPE(config_parse_kill_mode);
70CONFIG_PARSER_PROTOTYPE(config_parse_notify_access);
71CONFIG_PARSER_PROTOTYPE(config_parse_emergency_action);
9e615fa3 72CONFIG_PARSER_PROTOTYPE(config_parse_unit_mounts_for);
a2106925
LP
73CONFIG_PARSER_PROTOTYPE(config_parse_syscall_filter);
74CONFIG_PARSER_PROTOTYPE(config_parse_syscall_archs);
75CONFIG_PARSER_PROTOTYPE(config_parse_syscall_errno);
9df2cdd8 76CONFIG_PARSER_PROTOTYPE(config_parse_syscall_log);
a2106925
LP
77CONFIG_PARSER_PROTOTYPE(config_parse_environ);
78CONFIG_PARSER_PROTOTYPE(config_parse_pass_environ);
79CONFIG_PARSER_PROTOTYPE(config_parse_unset_environ);
80CONFIG_PARSER_PROTOTYPE(config_parse_unit_slice);
984faf29 81CONFIG_PARSER_PROTOTYPE(config_parse_cg_weight);
c8340822 82CONFIG_PARSER_PROTOTYPE(config_parse_cg_cpu_weight);
a2106925
LP
83CONFIG_PARSER_PROTOTYPE(config_parse_memory_limit);
84CONFIG_PARSER_PROTOTYPE(config_parse_tasks_max);
85CONFIG_PARSER_PROTOTYPE(config_parse_delegate);
a8b993dc 86CONFIG_PARSER_PROTOTYPE(config_parse_delegate_subgroup);
4d824a4e
AZ
87CONFIG_PARSER_PROTOTYPE(config_parse_managed_oom_mode);
88CONFIG_PARSER_PROTOTYPE(config_parse_managed_oom_mem_pressure_limit);
63d4c427 89CONFIG_PARSER_PROTOTYPE(config_parse_managed_oom_mem_pressure_duration_sec);
4e806bfa 90CONFIG_PARSER_PROTOTYPE(config_parse_managed_oom_preference);
a2106925
LP
91CONFIG_PARSER_PROTOTYPE(config_parse_device_policy);
92CONFIG_PARSER_PROTOTYPE(config_parse_device_allow);
6ae4283c 93CONFIG_PARSER_PROTOTYPE(config_parse_io_device_latency);
a2106925
LP
94CONFIG_PARSER_PROTOTYPE(config_parse_io_device_weight);
95CONFIG_PARSER_PROTOTYPE(config_parse_io_limit);
a2106925
LP
96CONFIG_PARSER_PROTOTYPE(config_parse_job_mode);
97CONFIG_PARSER_PROTOTYPE(config_parse_job_mode_isolate);
98CONFIG_PARSER_PROTOTYPE(config_parse_exec_selinux_context);
99CONFIG_PARSER_PROTOTYPE(config_parse_exec_apparmor_profile);
100CONFIG_PARSER_PROTOTYPE(config_parse_exec_smack_process_label);
101CONFIG_PARSER_PROTOTYPE(config_parse_address_families);
b9c1883a 102CONFIG_PARSER_PROTOTYPE(config_parse_exec_preserve_mode);
a2106925 103CONFIG_PARSER_PROTOTYPE(config_parse_exec_directories);
bb0c0d6f
LP
104CONFIG_PARSER_PROTOTYPE(config_parse_set_credential);
105CONFIG_PARSER_PROTOTYPE(config_parse_load_credential);
bbfb25f4 106CONFIG_PARSER_PROTOTYPE(config_parse_import_credential);
a2106925
LP
107CONFIG_PARSER_PROTOTYPE(config_parse_set_status);
108CONFIG_PARSER_PROTOTYPE(config_parse_namespace_path_strv);
109CONFIG_PARSER_PROTOTYPE(config_parse_temporary_filesystems);
0e551b04 110CONFIG_PARSER_PROTOTYPE(config_parse_private_tmp);
fa693fdc 111CONFIG_PARSER_PROTOTYPE(config_parse_private_users);
406f1775 112CONFIG_PARSER_PROTOTYPE(config_parse_private_pids);
5fe29238 113CONFIG_PARSER_PROTOTYPE(config_parse_protect_control_groups);
a2106925 114CONFIG_PARSER_PROTOTYPE(config_parse_cpu_quota);
0b9ae2d3 115CONFIG_PARSER_PROTOTYPE(config_parse_unit_cpu_set);
a2106925 116CONFIG_PARSER_PROTOTYPE(config_parse_protect_home);
6746f288 117CONFIG_PARSER_PROTOTYPE(config_parse_protect_hostname);
a2106925
LP
118CONFIG_PARSER_PROTOTYPE(config_parse_protect_system);
119CONFIG_PARSER_PROTOTYPE(config_parse_bus_name);
120CONFIG_PARSER_PROTOTYPE(config_parse_exec_utmp_mode);
121CONFIG_PARSER_PROTOTYPE(config_parse_working_directory);
122CONFIG_PARSER_PROTOTYPE(config_parse_fdname);
ae480f0b
ZJS
123CONFIG_PARSER_PROTOTYPE(config_parse_user_group_compat);
124CONFIG_PARSER_PROTOTYPE(config_parse_user_group_strv_compat);
8234cd99 125CONFIG_PARSER_PROTOTYPE(config_parse_namespace_flags);
e59ccd03 126CONFIG_PARSER_PROTOTYPE(config_parse_restrict_filesystems);
a2106925
LP
127CONFIG_PARSER_PROTOTYPE(config_parse_bind_paths);
128CONFIG_PARSER_PROTOTYPE(config_parse_exec_keyring_mode);
4e399953
LP
129CONFIG_PARSER_PROTOTYPE(config_parse_protect_proc);
130CONFIG_PARSER_PROTOTYPE(config_parse_proc_subset);
a2106925
LP
131CONFIG_PARSER_PROTOTYPE(config_parse_job_timeout_sec);
132CONFIG_PARSER_PROTOTYPE(config_parse_job_running_timeout_sec);
133CONFIG_PARSER_PROTOTYPE(config_parse_log_extra_fields);
91dd5f7c 134CONFIG_PARSER_PROTOTYPE(config_parse_log_namespace);
a2106925 135CONFIG_PARSER_PROTOTYPE(config_parse_collect_mode);
a9353a5c 136CONFIG_PARSER_PROTOTYPE(config_parse_pid_file);
7af67e9a 137CONFIG_PARSER_PROTOTYPE(config_parse_exit_status);
c72703e2 138CONFIG_PARSER_PROTOTYPE(config_parse_disable_controllers);
afcfaa69 139CONFIG_PARSER_PROTOTYPE(config_parse_oom_policy);
b070c7c0
MS
140CONFIG_PARSER_PROTOTYPE(config_parse_numa_policy);
141CONFIG_PARSER_PROTOTYPE(config_parse_numa_mask);
fab34748 142CONFIG_PARSER_PROTOTYPE(config_parse_ip_filter_bpf_progs);
a07a7324 143CONFIG_PARSER_PROTOTYPE(config_parse_show_status);
6327aa9f 144CONFIG_PARSER_PROTOTYPE(config_parse_status_unit_format);
a07a7324
FS
145CONFIG_PARSER_PROTOTYPE(config_parse_output_restricted);
146CONFIG_PARSER_PROTOTYPE(config_parse_crash_chvt);
147CONFIG_PARSER_PROTOTYPE(config_parse_timeout_abort);
eb34a981 148CONFIG_PARSER_PROTOTYPE(config_parse_swap_priority);
b3d13314 149CONFIG_PARSER_PROTOTYPE(config_parse_mount_images);
9b191525 150CONFIG_PARSER_PROTOTYPE(config_parse_socket_timestamping);
1b4ab5a2 151CONFIG_PARSER_PROTOTYPE(config_parse_socket_defer_trigger);
93f59701 152CONFIG_PARSER_PROTOTYPE(config_parse_extension_images);
0879da98 153CONFIG_PARSER_PROTOTYPE(config_parse_bpf_foreign_program);
8dd210ab 154CONFIG_PARSER_PROTOTYPE(config_parse_cgroup_socket_bind);
4f0c25c7 155CONFIG_PARSER_PROTOTYPE(config_parse_restrict_network_interfaces);
8a85c5b6 156CONFIG_PARSER_PROTOTYPE(config_parse_watchdog_sec);
51462135 157CONFIG_PARSER_PROTOTYPE(config_parse_tty_size);
523ea123 158CONFIG_PARSER_PROTOTYPE(config_parse_log_filter_patterns);
cd48e23f 159CONFIG_PARSER_PROTOTYPE(config_parse_open_file);
054749e4 160CONFIG_PARSER_PROTOTYPE(config_parse_memory_pressure_watch);
dc7d69b3 161CONFIG_PARSER_PROTOTYPE(config_parse_cgroup_nft_set);
435e1098 162CONFIG_PARSER_PROTOTYPE(config_parse_mount_node);
9ca16f6f 163CONFIG_PARSER_PROTOTYPE(config_parse_concurrency_max);
f975e971
LP
164
165/* gperf prototypes */
c9f7b4d3 166const struct ConfigPerfItem* load_fragment_gperf_lookup(const char *key, GPERF_LEN_TYPE length);
f975e971 167extern const char load_fragment_gperf_nulstr[];