summaryrefslogtreecommitdiff
path: root/src/core/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-04-17 14:29:41 +0200
committerLennart Poettering <lennart@poettering.net>2016-04-17 14:29:41 +0200
commit746af6e0b5aaed999be912e48505d3edc2cf874a (patch)
treee683aa6525e4eee3d7621c2c4a85f6042184c8b0 /src/core/mount.c
parentb50a16af8e3c353703d55f117077fcf60b8081e8 (diff)
parent24737c291738313fd67924172988a8986f60e958 (diff)
Merge pull request #3049 from keszybz/preset-fixes
Fixes for preset-all handling and a few related issues
Diffstat (limited to 'src/core/mount.c')
-rw-r--r--src/core/mount.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/mount.c b/src/core/mount.c
index 74ab54bfd0..632c5c824c 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -376,8 +376,7 @@ static int mount_add_quota_links(Mount *m) {
static bool should_umount(Mount *m) {
MountParameters *p;
- if (path_equal(m->where, "/") ||
- path_equal(m->where, "/usr") ||
+ if (PATH_IN_SET(m->where, "/", "/usr") ||
path_startswith(m->where, "/run/initramfs"))
return false;
@@ -408,8 +407,7 @@ static int mount_add_default_dependencies(Mount *m) {
* Also, don't bother with anything mounted below virtual
* file systems, it's also going to be virtual, and hence
* not worth the effort. */
- if (path_equal(m->where, "/") ||
- path_equal(m->where, "/usr") ||
+ if (PATH_IN_SET(m->where, "/", "/usr") ||
path_startswith(m->where, "/run/initramfs") ||
path_startswith(m->where, "/proc") ||
path_startswith(m->where, "/sys") ||