Blame SOURCES/0700-core-mount-setup-handle-non-existing-mountpoints-gra.patch
|
Pablo Greco |
48fc63 |
From 110af4eeadeec6e901d1189ed914d04fb8b60e13 Mon Sep 17 00:00:00 2001
|
|
Pablo Greco |
48fc63 |
From: Daniel Mack <daniel@zonque.org>
|
|
Pablo Greco |
48fc63 |
Date: Tue, 7 Apr 2015 00:44:15 +0200
|
|
Pablo Greco |
48fc63 |
Subject: [PATCH] core: mount-setup: handle non-existing mountpoints gracefully
|
|
Pablo Greco |
48fc63 |
|
|
Pablo Greco |
48fc63 |
Commit e792e890f ("path-util: don't eat up ENOENT in
|
|
Pablo Greco |
48fc63 |
path_is_mount_point()") changed path_is_mount_point() so it doesn't hide
|
|
Pablo Greco |
48fc63 |
-ENOENT from its caller. This causes all boots to fail early in case
|
|
Pablo Greco |
48fc63 |
any of the mount points does not exist (for instance, when kdbus isn't
|
|
Pablo Greco |
48fc63 |
loaded, /sys/fs/kdbus is missing).
|
|
Pablo Greco |
48fc63 |
|
|
Pablo Greco |
48fc63 |
Fix this by returning 0 from mount_one() if path_is_mount_point()
|
|
Pablo Greco |
48fc63 |
returned -ENOENT.
|
|
Pablo Greco |
48fc63 |
|
|
Pablo Greco |
48fc63 |
(cherry picked from commit b604cb9bf6a14d12589e85b82f3f59db93ea0029)
|
|
Pablo Greco |
48fc63 |
|
|
Pablo Greco |
48fc63 |
Resolves: #1585411
|
|
Pablo Greco |
48fc63 |
---
|
|
Pablo Greco |
48fc63 |
src/core/mount-setup.c | 3 +++
|
|
Pablo Greco |
48fc63 |
1 file changed, 3 insertions(+)
|
|
Pablo Greco |
48fc63 |
|
|
Pablo Greco |
48fc63 |
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
|
|
Pablo Greco |
48fc63 |
index ed493cbe36..71f07b6e2c 100644
|
|
Pablo Greco |
48fc63 |
--- a/src/core/mount-setup.c
|
|
Pablo Greco |
48fc63 |
+++ b/src/core/mount-setup.c
|
|
Pablo Greco |
48fc63 |
@@ -163,6 +163,9 @@ static int mount_one(const MountPoint *p, bool relabel) {
|
|
Pablo Greco |
48fc63 |
label_fix(p->where, true, true);
|
|
Pablo Greco |
48fc63 |
|
|
Pablo Greco |
48fc63 |
r = path_is_mount_point(p->where, true);
|
|
Pablo Greco |
48fc63 |
+ if (r == -ENOENT)
|
|
Pablo Greco |
48fc63 |
+ return 0;
|
|
Pablo Greco |
48fc63 |
+
|
|
Pablo Greco |
48fc63 |
if (r < 0)
|
|
Pablo Greco |
48fc63 |
return r;
|
|
Pablo Greco |
48fc63 |
|