From 225874dc9c40190cf58662e663c9b599c9e55c8c Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Thu, 18 Jan 2018 13:58:13 +0000 Subject: [PATCH] core: clone_device_node(): add debug message For people who use debug messages, maybe it is helpful to know that PrivateDevices= failed due to mknod(), and which device node. (The other (un-logged) failures could be while mounting filesystems e.g. no CAP_SYS_ADMIN which is the common case, or missing /dev/shm or /dev/pts, or missing /dev/ptmx). --- src/core/namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/namespace.c b/src/core/namespace.c index d6c1b1b..e1a9d7a 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -523,7 +523,7 @@ static int clone_device_node(const char *d, const char *temporary_mount) { mac_selinux_create_file_clear(); if (r < 0) - return -errno; + return log_debug_errno(errno, "mknod failed for %s: %m", d); return 0; } -- 2.7.4