]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
c2f1db8f | 2 | #pragma once |
5cb5a6ff LP |
3 | |
4 | typedef struct Automount Automount; | |
5 | ||
87f0e418 | 6 | #include "unit.h" |
5cb5a6ff | 7 | |
81a5c6d0 LP |
8 | typedef enum AutomountResult { |
9 | AUTOMOUNT_SUCCESS, | |
10 | AUTOMOUNT_FAILURE_RESOURCES, | |
07299350 | 11 | AUTOMOUNT_FAILURE_START_LIMIT_HIT, |
fae03ed3 | 12 | AUTOMOUNT_FAILURE_MOUNT_START_LIMIT_HIT, |
81a5c6d0 LP |
13 | _AUTOMOUNT_RESULT_MAX, |
14 | _AUTOMOUNT_RESULT_INVALID = -1 | |
15 | } AutomountResult; | |
16 | ||
5cb5a6ff | 17 | struct Automount { |
ac155bb8 | 18 | Unit meta; |
5cb5a6ff | 19 | |
a16e1123 | 20 | AutomountState state, deserialized_state; |
5cb5a6ff | 21 | |
8d567588 | 22 | char *where; |
deb0a77c | 23 | usec_t timeout_idle_usec; |
8d567588 | 24 | |
8d567588 | 25 | int pipe_fd; |
718db961 | 26 | sd_event_source *pipe_event_source; |
7fab9d01 | 27 | mode_t directory_mode; |
8d567588 LP |
28 | dev_t dev_id; |
29 | ||
30 | Set *tokens; | |
deb0a77c MO |
31 | Set *expire_tokens; |
32 | ||
33 | sd_event_source *expire_event_source; | |
8d567588 | 34 | |
81a5c6d0 | 35 | AutomountResult result; |
5cb5a6ff LP |
36 | }; |
37 | ||
87f0e418 | 38 | extern const UnitVTable automount_vtable; |
5cb5a6ff | 39 | |
44a6b1b6 ZJS |
40 | const char* automount_result_to_string(AutomountResult i) _const_; |
41 | AutomountResult automount_result_from_string(const char *s) _pure_; | |
57b7a260 FS |
42 | |
43 | DEFINE_CAST(AUTOMOUNT, Automount); |