From c08220e9d14f7f38849851dc5db16037ca28af53 Mon Sep 17 00:00:00 2001 From: "Micahel J. Evans" Date: Thu, 10 Jul 2014 20:06:15 -0700 Subject: [PATCH] Add extra debugging MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This is an hybrid between Micahel's original patch and me making the new debugging statements look like our existing ones. Signed-off-by: "Micahel J. Evans" Signed-off-by: Stéphane Graber --- src/lxc/namespace.c | 2 +- src/lxc/start.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lxc/namespace.c b/src/lxc/namespace.c index 31d4e7204..19b6593fd 100644 --- a/src/lxc/namespace.c +++ b/src/lxc/namespace.c @@ -64,7 +64,7 @@ pid_t lxc_clone(int (*fn)(void *), void *arg, int flags) ret = clone(do_clone, stack + stack_size, flags | SIGCHLD, &clone_arg); #endif if (ret < 0) - ERROR("failed to clone(0x%x): %s", flags, strerror(errno)); + ERROR("failed to clone (%#x): %s", flags, strerror(errno)); return ret; } diff --git a/src/lxc/start.c b/src/lxc/start.c index 6c7ac6ab8..584049e87 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -548,7 +548,10 @@ static int must_drop_cap_sys_boot(struct lxc_conf *conf) pid = clone(container_reboot_supported, stack, flags, &cmd); #endif if (pid < 0) { - SYSERROR("failed to clone"); + if (flags & CLONE_NEWUSER) + ERRROR("failed to clone (%#x): %s (includes CLONE_NEWUSER)", flags, strerror(errno)); + else + ERRROR("failed to clone (%#x): %s", flags, strerror(errno)); return -1; } if (wait(&status) < 0) { -- 2.47.2