]>
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 | |
8 | ||
9 | systemd is free software; you can redistribute it and/or modify it | |
5430f7f2 LP |
10 | under the terms of the GNU Lesser General Public License as published by |
11 | the Free Software Foundation; either version 2.1 of the License, or | |
a7334b09 LP |
12 | (at your option) any later version. |
13 | ||
14 | systemd is distributed in the hope that it will be useful, but | |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
5430f7f2 | 17 | Lesser General Public License for more details. |
a7334b09 | 18 | |
5430f7f2 | 19 | You should have received a copy of the GNU Lesser General Public License |
a7334b09 LP |
20 | along with systemd; If not, see <http://www.gnu.org/licenses/>. |
21 | ***/ | |
22 | ||
5cb5a6ff LP |
23 | typedef struct Automount Automount; |
24 | ||
87f0e418 | 25 | #include "unit.h" |
5cb5a6ff | 26 | |
81a5c6d0 LP |
27 | typedef enum AutomountResult { |
28 | AUTOMOUNT_SUCCESS, | |
29 | AUTOMOUNT_FAILURE_RESOURCES, | |
07299350 | 30 | AUTOMOUNT_FAILURE_START_LIMIT_HIT, |
fae03ed3 | 31 | AUTOMOUNT_FAILURE_MOUNT_START_LIMIT_HIT, |
81a5c6d0 LP |
32 | _AUTOMOUNT_RESULT_MAX, |
33 | _AUTOMOUNT_RESULT_INVALID = -1 | |
34 | } AutomountResult; | |
35 | ||
5cb5a6ff | 36 | struct Automount { |
ac155bb8 | 37 | Unit meta; |
5cb5a6ff | 38 | |
a16e1123 | 39 | AutomountState state, deserialized_state; |
5cb5a6ff | 40 | |
8d567588 | 41 | char *where; |
deb0a77c | 42 | usec_t timeout_idle_usec; |
8d567588 | 43 | |
8d567588 | 44 | int pipe_fd; |
718db961 | 45 | sd_event_source *pipe_event_source; |
7fab9d01 | 46 | mode_t directory_mode; |
8d567588 LP |
47 | dev_t dev_id; |
48 | ||
49 | Set *tokens; | |
deb0a77c MO |
50 | Set *expire_tokens; |
51 | ||
52 | sd_event_source *expire_event_source; | |
8d567588 | 53 | |
81a5c6d0 | 54 | AutomountResult result; |
5cb5a6ff LP |
55 | }; |
56 | ||
87f0e418 | 57 | extern const UnitVTable automount_vtable; |
5cb5a6ff | 58 | |
44a6b1b6 ZJS |
59 | const char* automount_result_to_string(AutomountResult i) _const_; |
60 | AutomountResult automount_result_from_string(const char *s) _pure_; |