summaryrefslogtreecommitdiff
path: root/src/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-08-11 23:19:04 +0200
committerLennart Poettering <lennart@poettering.net>2010-08-11 23:19:04 +0200
commit1e59887dc92e163163051e627817e1675374cd22 (patch)
tree5d5364029f749f08670e6ef272fbf6287b9780cd /src/mount.c
parente51bc1a23e8f581e4fe46aa4df1bd93b7042c184 (diff)
gc: remove a lot of unused code
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);