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