]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/core/automount.h
Merge pull request #21472 from mrc0mmand/sanitizer_suppressions
[thirdparty/systemd.git] / src / core / automount.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
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_UNMOUNTED,
12 AUTOMOUNT_FAILURE_START_LIMIT_HIT,
13 AUTOMOUNT_FAILURE_MOUNT_START_LIMIT_HIT,
14 AUTOMOUNT_FAILURE_MOUNT_CONDITION_FAILED,
15 _AUTOMOUNT_RESULT_MAX,
16 _AUTOMOUNT_RESULT_INVALID = -EINVAL,
17 } AutomountResult;
18
19 struct Automount {
20 Unit meta;
21
22 AutomountState state, deserialized_state;
23
24 char *where;
25 char *extra_options;
26 usec_t timeout_idle_usec;
27
28 int pipe_fd;
29 sd_event_source *pipe_event_source;
30 mode_t directory_mode;
31 dev_t dev_id;
32
33 Set *tokens;
34 Set *expire_tokens;
35
36 sd_event_source *expire_event_source;
37
38 AutomountResult result;
39 };
40
41 extern const UnitVTable automount_vtable;
42
43 const char* automount_result_to_string(AutomountResult i) _const_;
44 AutomountResult automount_result_from_string(const char *s) _pure_;
45
46 DEFINE_CAST(AUTOMOUNT, Automount);