summaryrefslogtreecommitdiff
path: root/src/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-21 03:32:21 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-21 03:32:21 +0200
commit8cbef76075910864ed31879c9fb193c127adc20d (patch)
tree7ddddfcd0340bc9f24afa7c91919504ce0dd28a7 /src/mount.c
parent9726b29e9811d12c0800a53f0a34dc26fe9b915c (diff)
mount: refuse mount units that have not been loaded from any source
Diffstat (limited to 'src/mount.c')
-rw-r--r--src/mount.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mount.c b/src/mount.c
index 921984c1c1..3b1608060e 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -267,9 +267,12 @@ static int mount_verify(Mount *m) {
char *e;
assert(m);
- if (UNIT(m)->meta.load_state != UNIT_LOADED)
+ if (m->meta.load_state != UNIT_LOADED)
return 0;
+ if (!m->from_etc_fstab && !m->from_fragment && !m->from_proc_self_mountinfo)
+ return -ENOENT;
+
if (!(e = unit_name_from_path(m->where, ".mount")))
return -ENOMEM;