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