4 This file is part of systemd.
6 Copyright 2010 Lennart Poettering
8 systemd is free software; you can redistribute it and/or modify it
9 under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation; either version 2.1 of the License, or
11 (at your option) any later version.
13 systemd is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
18 You should have received a copy of the GNU Lesser General Public License
19 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 typedef struct Mount Mount
;
27 typedef enum MountExecCommand
{
31 _MOUNT_EXEC_COMMAND_MAX
,
32 _MOUNT_EXEC_COMMAND_INVALID
= -1
35 typedef enum MountResult
{
37 MOUNT_FAILURE_RESOURCES
,
38 MOUNT_FAILURE_TIMEOUT
,
39 MOUNT_FAILURE_EXIT_CODE
,
41 MOUNT_FAILURE_CORE_DUMP
,
43 _MOUNT_RESULT_INVALID
= -1
46 typedef struct MountParameters
{
57 MountParameters parameters_proc_self_mountinfo
;
58 MountParameters parameters_fragment
;
60 bool from_proc_self_mountinfo
:1;
63 /* Used while looking for mount points that vanished or got
64 * added from/to /proc/self/mountinfo */
69 bool reset_cpu_usage
:1;
74 MountResult reload_result
;
76 mode_t directory_mode
;
80 ExecCommand exec_command
[_MOUNT_EXEC_COMMAND_MAX
];
82 ExecContext exec_context
;
83 KillContext kill_context
;
84 CGroupContext cgroup_context
;
86 ExecRuntime
*exec_runtime
;
88 MountState state
, deserialized_state
;
90 ExecCommand
* control_command
;
91 MountExecCommand control_command_id
;
94 sd_event_source
*timer_event_source
;
96 unsigned n_retry_umount
;
99 extern const UnitVTable mount_vtable
;
101 void mount_fd_event(Manager
*m
, int events
);
103 const char* mount_exec_command_to_string(MountExecCommand i
) _const_
;
104 MountExecCommand
mount_exec_command_from_string(const char *s
) _pure_
;
106 const char* mount_result_to_string(MountResult i
) _const_
;
107 MountResult
mount_result_from_string(const char *s
) _pure_
;