summaryrefslogtreecommitdiff
path: root/src/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mount.c')
-rw-r--r--src/mount.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/src/mount.c b/src/mount.c
index 9a201f33ed..38547f7294 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -1487,57 +1487,6 @@ void mount_fd_event(Manager *m, int events) {
}
}
-int mount_path_is_mounted(Manager *m, const char* path) {
- char *t;
- int r;
-
- assert(m);
- assert(path);
-
- if (path[0] != '/')
- return 1;
-
- if (!(t = strdup(path)))
- return -ENOMEM;
-
- path_kill_slashes(t);
-
- for (;;) {
- char *e, *slash;
- Unit *u;
-
- if (!(e = unit_name_from_path(t, ".mount"))) {
- r = -ENOMEM;
- goto finish;
- }
-
- u = manager_get_unit(m, e);
- free(e);
-
- if (u &&
- (MOUNT(u)->from_etc_fstab || MOUNT(u)->from_fragment) &&
- MOUNT(u)->state != MOUNT_MOUNTED) {
- r = 0;
- goto finish;
- }
-
- assert_se(slash = strrchr(t, '/'));
-
- if (slash == t) {
- r = 1;
- goto finish;
- }
-
- *slash = 0;
- }
-
- r = 1;
-
-finish:
- free(t);
- return r;
-}
-
static void mount_reset_maintenance(Unit *u) {
Mount *m = MOUNT(u);