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