diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-09-24 12:48:46 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-09-24 12:48:46 +0200 |
commit | dd144c63e285e35149f80b1a41af548ad040c037 (patch) | |
tree | 118595eecc8583da23d3d11fc65bc15f32bb3f59 /src | |
parent | 63a8b2f947ad77c464acac475be84682065a6522 (diff) |
mount: simplify device node conditions a bit
Diffstat (limited to 'src')
-rw-r--r-- | src/core/mount.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/core/mount.c b/src/core/mount.c index db793f2b5d..3e40e3fc7b 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -352,18 +352,20 @@ static int mount_add_device_links(Mount *m) { if (!p->what) return 0; - if (!mount_is_bind(p) && - !path_equal(m->where, "/") && - is_device_path(p->what)) { - r = unit_add_node_link(UNIT(m), p->what, false); - if (r < 0) - return r; - } + if (mount_is_bind(p)) + return 0; + + if (!is_device_path(p->what)) + return 0; + + if (path_equal(m->where, "/")) + return 0; + + r = unit_add_node_link(UNIT(m), p->what, false); + if (r < 0) + return r; if (p->passno > 0 && - !mount_is_bind(p) && - !path_equal(m->where, "/") && - is_device_path(p->what) && UNIT(m)->manager->running_as == SYSTEMD_SYSTEM) { char *name; Unit *fsck; |