summaryrefslogtreecommitdiff
path: root/src/basic/mount-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-08-06 00:32:46 +0200
committerSven Eden <yamakuzure@gmx.net>2017-07-05 08:50:50 +0200
commit5e1305e0bba2fe1087cbd7237c6c5b2f65c48d7f (patch)
treededd24434691432f20e5e5a304d507ec84cd240b /src/basic/mount-util.c
parent50875bd0105ae2cce809a336dd5a356d4984d971 (diff)
add a new tool for creating transient mount and automount units
This adds "elogind-mount" which is for transient mount and automount units what "elogind-run" is for transient service, scope and timer units. The tool allows establishing mounts and automounts during runtime. It is very similar to the usual /bin/mount commands, but can pull in additional dependenices on access (for example, it pulls in fsck automatically), an take benefit of the automount logic. This tool is particularly useful for mount removable file systems (such as USB sticks), as the automount logic (together with automatic unmount-on-idle), as well as automatic fsck on first access ensure that the removable file system has a high chance to remain in a fully clean state even when it is unplugged abruptly, and returns to a clean state on the next re-plug. This is a follow-up for #2471, as it adds a simple client-side for the transient automount logic added in that PR. In later work it might make sense to invoke this tool automatically from udev rules in order to implement a simpler and safer version of removable media management รก la udisks.
Diffstat (limited to 'src/basic/mount-util.c')
-rw-r--r--src/basic/mount-util.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/basic/mount-util.c b/src/basic/mount-util.c
index 121619eed..c85c47301 100644
--- a/src/basic/mount-util.c
+++ b/src/basic/mount-util.c
@@ -75,7 +75,6 @@ static int fd_fdinfo_mnt_id(int fd, const char *filename, int flags, int *mnt_id
return safe_atoi(p, mnt_id);
}
-
int fd_is_mount_point(int fd, const char *filename, int flags) {
union file_handle_union h = FILE_HANDLE_INIT, h_parent = FILE_HANDLE_INIT;
int mount_id = -1, mount_id_parent = -1;