summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-02-25 13:36:32 +0100
committerLennart Poettering <lennart@poettering.net>2021-02-25 13:36:32 +0100
commitd60e3b405df6aafd27d2072a4e055fb116ab4527 (patch)
tree7c55a5c0ca880624ce523d500cb8720b385a14a1 /src/core
parentenv-util: fix parameter handling of parse_env_extension_hierarchies() + geten... (diff)
downloadsystemd-d60e3b405df6aafd27d2072a4e055fb116ab4527.tar.xz
systemd-d60e3b405df6aafd27d2072a4e055fb116ab4527.zip
namespace: return correct error code
Diffstat (limited to 'src/core')
-rw-r--r--src/core/namespace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/namespace.c b/src/core/namespace.c
index ed07db5c73..9a0375fddd 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -1554,9 +1554,12 @@ static int apply_mounts(
* /proc. For example, this is the case with the option: 'InaccessiblePaths=/proc'. */
proc_self_mountinfo = fopen("/proc/self/mountinfo", "re");
if (!proc_self_mountinfo) {
+ r = -errno;
+
if (error_path)
*error_path = strdup("/proc/self/mountinfo");
- return log_debug_errno(errno, "Failed to open /proc/self/mountinfo: %m");
+
+ return log_debug_errno(r, "Failed to open /proc/self/mountinfo: %m");
}
/* First round, establish all mounts we need */