X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fnamespace.c;h=32338cdc60a59e446577590a9de531c03e601c5c;hb=56f64d95763a799ba4475daf44d8e9f72a1bd474;hp=a2025459f1447823ed0fe3f43208e9720d345280;hpb=895b3a7b44fe7ca2f260986be2a877ff56a72718;p=elogind.git diff --git a/src/core/namespace.c b/src/core/namespace.c index a2025459f..32338cdc6 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -277,7 +277,7 @@ static int mount_kdbus(BindMount *m) { u = umask(0000); if (!mkdtemp(temporary_mount)) { - log_error("Failed create temp dir: %m"); + log_error_errno(errno, "Failed create temp dir: %m"); return -errno; } @@ -291,21 +291,21 @@ static int mount_kdbus(BindMount *m) { /* create a new /dev/null dev node copy so we have some fodder to * bind-mount the custom endpoint over. */ if (stat("/dev/null", &st) < 0) { - log_error("Failed to stat /dev/null: %m"); + log_error_errno(errno, "Failed to stat /dev/null: %m"); r = -errno; goto fail; } busnode = strappenda(root, "/bus"); if (mknod(busnode, (st.st_mode & ~07777) | 0600, st.st_rdev) < 0) { - log_error("mknod() for %s failed: %m", busnode); + log_error_errno(errno, "mknod() for %s failed: %m", busnode); r = -errno; goto fail; } r = mount(m->path, busnode, "bind", MS_BIND, NULL); if (r < 0) { - log_error("bind mount of %s failed: %m", m->path); + log_error_errno(errno, "bind mount of %s failed: %m", m->path); r = -errno; goto fail; } @@ -317,7 +317,7 @@ static int mount_kdbus(BindMount *m) { } if (mount(root, basepath, NULL, MS_MOVE, NULL) < 0) { - log_error("bind mount of %s failed: %m", basepath); + log_error_errno(errno, "bind mount of %s failed: %m", basepath); r = -errno; goto fail; }