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