From: Lennart Poettering Date: Thu, 25 Feb 2021 12:36:32 +0000 (+0100) Subject: namespace: return correct error code X-Git-Tag: v248-rc3~110^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d60e3b405df6aafd27d2072a4e055fb116ab4527;p=thirdparty%2Fsystemd.git namespace: return correct error code --- diff --git a/src/core/namespace.c b/src/core/namespace.c index ed07db5c731..9a0375fddd2 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 */