summaryrefslogtreecommitdiff
path: root/mount-setup.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-04-16 23:24:39 +0200
committerLennart Poettering <lennart@poettering.net>2010-04-16 23:24:39 +0200
commit8d567588cad053f79abe603ab113e1b85a92f1da (patch)
treed29f8cbd6233fac569b84774d7a72a5fd8049b29 /mount-setup.c
parent2076ca540e4ffdd320e086c8b570a5bf19546022 (diff)
automount: implement automount unit type
Diffstat (limited to 'mount-setup.c')
-rw-r--r--mount-setup.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/mount-setup.c b/mount-setup.c
index 013e6144cf..a804030df0 100644
--- a/mount-setup.c
+++ b/mount-setup.c
@@ -64,37 +64,12 @@ bool mount_point_is_api(const char *path) {
return false;
}
-static int is_mount_point(const char *t) {
- struct stat a, b;
- char *copy;
-
- if (lstat(t, &a) < 0) {
-
- if (errno == ENOENT)
- return 0;
-
- return -errno;
- }
-
- if (!(copy = strdup(t)))
- return -ENOMEM;
-
- if (lstat(dirname(copy), &b) < 0) {
- free(copy);
- return -errno;
- }
-
- free(copy);
-
- return a.st_dev != b.st_dev;
-}
-
static int mount_one(const MountPoint *p) {
int r;
assert(p);
- if ((r = is_mount_point(p->where)) < 0)
+ if ((r = path_is_mount_point(p->where)) < 0)
return r;
if (r > 0)