]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/core/automount.h
automount: make user unmounting for automount units more debuggable
[thirdparty/systemd.git] / src / core / automount.h
CommitLineData
53e1b683 1/* SPDX-License-Identifier: LGPL-2.1+ */
c2f1db8f 2#pragma once
5cb5a6ff
LP
3
4typedef struct Automount Automount;
5
87f0e418 6#include "unit.h"
5cb5a6ff 7
81a5c6d0
LP
8typedef 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
LP
14 _AUTOMOUNT_RESULT_MAX,
15 _AUTOMOUNT_RESULT_INVALID = -1
16} AutomountResult;
17
5cb5a6ff 18struct Automount {
ac155bb8 19 Unit meta;
5cb5a6ff 20
a16e1123 21 AutomountState state, deserialized_state;
5cb5a6ff 22
8d567588 23 char *where;
deb0a77c 24 usec_t timeout_idle_usec;
8d567588 25
8d567588 26 int pipe_fd;
718db961 27 sd_event_source *pipe_event_source;
7fab9d01 28 mode_t directory_mode;
8d567588
LP
29 dev_t dev_id;
30
31 Set *tokens;
deb0a77c
MO
32 Set *expire_tokens;
33
34 sd_event_source *expire_event_source;
8d567588 35
81a5c6d0 36 AutomountResult result;
5cb5a6ff
LP
37};
38
87f0e418 39extern const UnitVTable automount_vtable;
5cb5a6ff 40
44a6b1b6
ZJS
41const char* automount_result_to_string(AutomountResult i) _const_;
42AutomountResult automount_result_from_string(const char *s) _pure_;
57b7a260
FS
43
44DEFINE_CAST(AUTOMOUNT, Automount);