From: Micahel J. Evans Date: Fri, 11 Jul 2014 03:06:15 +0000 (-0700) Subject: Add extra debugging X-Git-Tag: lxc-1.1.0.alpha2~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c08220e9d14f7f38849851dc5db16037ca28af53;p=thirdparty%2Flxc.git Add extra debugging 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 --- 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) {