diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-07-20 09:22:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-20 09:22:40 +0200 |
commit | 42c32d6ff431eade17039ca98bf3bd6fb3ae2559 (patch) | |
tree | 2f677c6a2f8aae05097147456f0a8192afaa2ecf /src/core/namespace.c | |
parent | 13317a22e5cf8f7c458616a971e60e84255bc364 (diff) | |
parent | 5fd7cf6fe23aa3c96891ef4d2d76786e935ec7aa (diff) |
Merge pull request #3759 from poettering/namespace-fixup
minor follow-up fixes for #3685
Diffstat (limited to 'src/core/namespace.c')
-rw-r--r-- | src/core/namespace.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/core/namespace.c b/src/core/namespace.c index 722538caf1..8df82c031c 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -291,16 +291,15 @@ static int apply_mount( * inaccessible path. */ umount_recursive(m->path, 0); - r = lstat(m->path, &target); - if (r != 0) { + if (lstat(m->path, &target) < 0) { if (m->ignore && errno == ENOENT) return 0; return -errno; } what = mode_to_inaccessible_node(target.st_mode); - if (what == NULL) { - log_debug("File type not supported. Note that symlinks are not allowed"); + if (!what) { + log_debug("File type not supported for inaccessible mounts. Note that symlinks are not allowed"); return -ELOOP; } break; @@ -331,12 +330,10 @@ static int apply_mount( if (r >= 0) { log_debug("Successfully mounted %s to %s", what, m->path); return r; - } - else { + } else { if (m->ignore && errno == ENOENT) return 0; - log_debug("Failed mounting %s to %s: %s", what, m->path, strerror(errno)); - return -errno; + return log_debug_errno(errno, "Failed to mount %s to %s: %m", what, m->path); } } |