]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Add extra debugging
authorMicahel J. Evans <mjevans1983@gmail.com>
Fri, 11 Jul 2014 03:06:15 +0000 (20:06 -0700)
committerStéphane Graber <stgraber@ubuntu.com>
Sat, 16 Aug 2014 01:21:05 +0000 (21:21 -0400)
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" <mjevans1983@gmail.com>
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/namespace.c
src/lxc/start.c

index 31d4e7204b293cf9390b6f6a7b642d4927c88c68..19b6593fd223cc5202086f9e6232c1119f9a63ce 100644 (file)
@@ -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;
 }
index 6c7ac6ab8f5ac66bef54863e1338cd107e9cde40..584049e87f32c96c91f7cea85a94114e34874597 100644 (file)
@@ -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) {