2012-07-18 21:07:51 +04:00
# pragma once
2009-11-20 01:13:20 +03:00
2010-02-03 15:03:47 +03:00
/***
This file is part of systemd .
Copyright 2010 Lennart Poettering
systemd is free software ; you can redistribute it and / or modify it
2012-04-12 02:20:58 +04:00
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation ; either version 2.1 of the License , or
2010-02-03 15:03:47 +03:00
( at your option ) any later version .
systemd is distributed in the hope that it will be useful , but
WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU
2012-04-12 02:20:58 +04:00
Lesser General Public License for more details .
2010-02-03 15:03:47 +03:00
2012-04-12 02:20:58 +04:00
You should have received a copy of the GNU Lesser General Public License
2010-02-03 15:03:47 +03:00
along with systemd ; If not , see < http : //www.gnu.org/licenses/>.
* * */
2010-01-26 23:39:06 +03:00
# include "unit.h"
2009-11-20 01:13:20 +03:00
/* Read service data from .desktop file style configuration fragments */
2010-04-10 19:53:17 +04:00
int unit_load_fragment ( Unit * u ) ;
void unit_dump_config_items ( FILE * f ) ;
2009-11-20 01:13:20 +03:00
2013-11-19 19:17:55 +04:00
int config_parse_warn_compat ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_unit_deps ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2015-11-12 21:21:47 +03:00
int config_parse_obsolete_unit_deps ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2013-11-19 19:17:55 +04:00
int config_parse_unit_string_printf ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_unit_strv_printf ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_unit_path_printf ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-06-04 18:19:00 +04:00
int config_parse_unit_path_strv_printf ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2013-11-19 19:17:55 +04:00
int config_parse_documentation ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_socket_listen ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2015-11-16 09:45:47 +03:00
int config_parse_socket_protocol ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2013-11-19 19:17:55 +04:00
int config_parse_socket_bind ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_exec_nice ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_exec_oom_score_adjust ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_exec ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_service_timeout ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_service_type ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_service_restart ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_socket_bindtodevice ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_output ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_input ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_exec_io_class ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_exec_io_priority ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_exec_cpu_sched_policy ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_exec_cpu_sched_prio ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_exec_cpu_affinity ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_exec_secure_bits ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2016-01-08 01:00:04 +03:00
int config_parse_capability_set ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2013-11-19 19:17:55 +04:00
int config_parse_limit ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_sysv_priority ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_kill_signal ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_exec_mount_flags ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_timer ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_trigger_unit ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_path_spec ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_socket_service ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_service_sockets ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2013-12-03 02:30:19 +04:00
int config_parse_busname_service ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-03-07 01:42:42 +04:00
int config_parse_bus_policy ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-06-05 14:24:03 +04:00
int config_parse_bus_policy_world ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2013-11-19 19:17:55 +04:00
int config_parse_unit_env_file ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_ip_tos ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_unit_condition_path ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_unit_condition_string ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_unit_condition_null ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_kill_mode ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_notify_access ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-04-24 11:35:38 +04:00
int config_parse_failure_action ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2013-11-19 19:17:55 +04:00
int config_parse_unit_requires_mounts_for ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_syscall_filter ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-02-13 03:24:00 +04:00
int config_parse_syscall_archs ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-02-12 21:28:21 +04:00
int config_parse_syscall_errno ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2013-11-19 19:17:55 +04:00
int config_parse_environ ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2015-09-07 09:06:53 +03:00
int config_parse_pass_environ ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2013-11-19 19:17:55 +04:00
int config_parse_unit_slice ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2016-08-07 16:45:39 +03:00
int config_parse_cpu_weight ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2013-11-19 19:17:55 +04:00
int config_parse_cpu_shares ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_memory_limit ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2015-09-10 13:32:16 +03:00
int config_parse_tasks_max ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2013-11-19 19:17:55 +04:00
int config_parse_device_policy ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_device_allow ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2016-05-05 23:42:55 +03:00
int config_parse_io_weight ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_io_device_weight ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_io_limit ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2013-11-19 19:17:55 +04:00
int config_parse_blockio_weight ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_blockio_device_weight ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_blockio_bandwidth ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2015-01-15 22:08:42 +03:00
int config_parse_netclass ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2013-11-26 04:39:53 +04:00
int config_parse_job_mode ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_job_mode_isolate ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-02-17 19:52:52 +04:00
int config_parse_exec_selinux_context ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-02-20 19:19:44 +04:00
int config_parse_exec_apparmor_profile ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-11-24 14:46:20 +03:00
int config_parse_exec_smack_process_label ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-02-25 23:37:03 +04:00
int config_parse_address_families ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-03-03 20:14:07 +04:00
int config_parse_runtime_directory ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-03-04 00:26:53 +04:00
int config_parse_set_status ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-03-04 00:40:55 +04:00
int config_parse_namespace_path_strv ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-05-18 17:43:18 +04:00
int config_parse_no_new_privileges ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-04-25 15:27:25 +04:00
int config_parse_cpu_quota ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2014-06-04 20:07:55 +04:00
int config_parse_protect_home ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_protect_system ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2015-01-08 00:07:09 +03:00
int config_parse_bus_name ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2015-08-23 14:14:04 +03:00
int config_parse_exec_utmp_mode ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2015-09-23 20:46:23 +03:00
int config_parse_working_directory ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2015-10-04 18:36:19 +03:00
int config_parse_fdname ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2016-02-09 01:56:30 +03:00
int config_parse_sec_fix_0 ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2016-07-14 13:28:06 +03:00
int config_parse_user_group ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
int config_parse_user_group_strv ( const char * unit , const char * filename , unsigned line , const char * section , unsigned section_line , const char * lvalue , int ltype , const char * rvalue , void * data , void * userdata ) ;
2011-08-01 02:43:05 +04:00
/* gperf prototypes */
const struct ConfigPerfItem * load_fragment_gperf_lookup ( const char * key , unsigned length ) ;
extern const char load_fragment_gperf_nulstr [ ] ;
2014-11-30 18:21:49 +03:00
typedef enum Disabled {
DISABLED_CONFIGURATION ,
2014-11-30 18:42:53 +03:00
DISABLED_LEGACY ,
2014-11-30 18:21:49 +03:00
DISABLED_EXPERIMENTAL ,
} Disabled ;