summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-16 22:52:06 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-16 22:57:05 -0400
commit3ae5990c6ed54f5d4acec12c2e9e40d110c72230 (patch)
treedc844349409cfc123fb1cfe4b52c01153ef27ee4 /src/core
parent9a0a413a195a21888cf926be5595d0efc1eef0fe (diff)
tree-wide: introduce PATH_IN_SET macro
Diffstat (limited to 'src/core')
-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") ||