]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
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, | |
acd156d1 | 11 | AUTOMOUNT_FAILURE_UNMOUNTED, |
07299350 | 12 | AUTOMOUNT_FAILURE_START_LIMIT_HIT, |
fae03ed3 | 13 | AUTOMOUNT_FAILURE_MOUNT_START_LIMIT_HIT, |
81a5c6d0 | 14 | _AUTOMOUNT_RESULT_MAX, |
2d93c20e | 15 | _AUTOMOUNT_RESULT_INVALID = -EINVAL, |
81a5c6d0 LP |
16 | } AutomountResult; |
17 | ||
5cb5a6ff | 18 | struct Automount { |
ac155bb8 | 19 | Unit meta; |
5cb5a6ff | 20 | |
a16e1123 | 21 | AutomountState state, deserialized_state; |
5cb5a6ff | 22 | |
8d567588 | 23 | char *where; |
7c5cef22 | 24 | char *extra_options; |
deb0a77c | 25 | usec_t timeout_idle_usec; |
8d567588 | 26 | |
8d567588 | 27 | int pipe_fd; |
718db961 | 28 | sd_event_source *pipe_event_source; |
7fab9d01 | 29 | mode_t directory_mode; |
8d567588 LP |
30 | dev_t dev_id; |
31 | ||
32 | Set *tokens; | |
deb0a77c MO |
33 | Set *expire_tokens; |
34 | ||
35 | sd_event_source *expire_event_source; | |
8d567588 | 36 | |
81a5c6d0 | 37 | AutomountResult result; |
5cb5a6ff LP |
38 | }; |
39 | ||
87f0e418 | 40 | extern const UnitVTable automount_vtable; |
5cb5a6ff | 41 | |
44a6b1b6 ZJS |
42 | const char* automount_result_to_string(AutomountResult i) _const_; |
43 | AutomountResult automount_result_from_string(const char *s) _pure_; | |
57b7a260 FS |
44 | |
45 | DEFINE_CAST(AUTOMOUNT, Automount); |