]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/core/automount.h
Merge pull request #9274 from poettering/comment-header-cleanup
[thirdparty/systemd.git] / src / core / automount.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 typedef struct Automount Automount;
5
6 #include "unit.h"
7
8 typedef enum AutomountResult {
9 AUTOMOUNT_SUCCESS,
10 AUTOMOUNT_FAILURE_RESOURCES,
11 AUTOMOUNT_FAILURE_START_LIMIT_HIT,
12 AUTOMOUNT_FAILURE_MOUNT_START_LIMIT_HIT,
13 _AUTOMOUNT_RESULT_MAX,
14 _AUTOMOUNT_RESULT_INVALID = -1
15 } AutomountResult;
16
17 struct Automount {
18 Unit meta;
19
20 AutomountState state, deserialized_state;
21
22 char *where;
23 usec_t timeout_idle_usec;
24
25 int pipe_fd;
26 sd_event_source *pipe_event_source;
27 mode_t directory_mode;
28 dev_t dev_id;
29
30 Set *tokens;
31 Set *expire_tokens;
32
33 sd_event_source *expire_event_source;
34
35 AutomountResult result;
36 };
37
38 extern const UnitVTable automount_vtable;
39
40 const char* automount_result_to_string(AutomountResult i) _const_;
41 AutomountResult automount_result_from_string(const char *s) _pure_;
42
43 DEFINE_CAST(AUTOMOUNT, Automount);