diff options
author | Ken Werner <ken@linux.vnet.ibm.com> | 2014-12-16 18:06:41 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-12-17 00:20:56 -0500 |
commit | 60e1651a31c9c0ed1caef1a63f5e3a87156b0b1e (patch) | |
tree | 626f620b4862c64a3a2ee1d2d0a5d0ad47681f46 /src/nspawn | |
parent | ef686ae230c55124e3efdc7d756fb1931e10aef4 (diff) |
nspawn: fix invocation of the raw clone() system call on s390 and cris
Since the order of the first and second arguments of the raw clone() system
call is reversed on s390 and cris it needs to be invoked differently.
Diffstat (limited to 'src/nspawn')
-rw-r--r-- | src/nspawn/nspawn.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 9ca53cd1b4..a13c1fcd24 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -3133,9 +3133,9 @@ int main(int argc, char *argv[]) { goto finish; } - pid = syscall(__NR_clone, SIGCHLD|CLONE_NEWNS| - (arg_share_system ? 0 : CLONE_NEWIPC|CLONE_NEWPID|CLONE_NEWUTS)| - (arg_private_network ? CLONE_NEWNET : 0), NULL); + pid = raw_clone(SIGCHLD|CLONE_NEWNS| + (arg_share_system ? 0 : CLONE_NEWIPC|CLONE_NEWPID|CLONE_NEWUTS)| + (arg_private_network ? CLONE_NEWNET : 0), NULL); if (pid < 0) { if (errno == EINVAL) r = log_error_errno(errno, "clone() failed, do you have namespace support enabled in your kernel? (You need UTS, IPC, PID and NET namespacing built in): %m"); |