Search
j0ke.net Open Build Service
>
Projects
>
virtualization
:
Cloud
:
OpenNebula
>
libvirt
> clone-0.9.10.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File clone-0.9.10.patch of Package libvirt
--- src/lxc/lxc_container.c.orig 2012-02-13 08:06:23.000000000 +0100 +++ src/lxc/lxc_container.c 2012-02-18 19:58:47.654818788 +0100 @@ -1439,6 +1439,9 @@ ttyPaths, nttyPaths, handshakefd}; /* allocate a stack for the container */ +#ifdef __ia64__ + stacksize *= 2; +#endif if (VIR_ALLOC_N(stack, stacksize) < 0) { virReportOOMError(); return -1; @@ -1457,7 +1460,11 @@ cflags |= CLONE_NEWNET; } +#ifdef __ia64__ + pid = __clone2(lxcContainerChild, stack, stacksize, flags, &args); +#else pid = clone(lxcContainerChild, stacktop, cflags, &args); +#endif VIR_FREE(stack); VIR_DEBUG("clone() completed, new container PID is %d", pid); @@ -1483,6 +1490,7 @@ int cpid; char *childStack; char *stack; + int stacksize = getpagesize() * 4; if (features & LXC_CONTAINER_FEATURE_USER) flags |= CLONE_NEWUSER; @@ -1490,14 +1498,21 @@ if (features & LXC_CONTAINER_FEATURE_NET) flags |= CLONE_NEWNET; - if (VIR_ALLOC_N(stack, getpagesize() * 4) < 0) { +#ifdef __ia64__ + stacksize *= 2; +#endif + if (VIR_ALLOC_N(stack, stacksize) < 0) { VIR_DEBUG("Unable to allocate stack"); return -1; } - childStack = stack + (getpagesize() * 4); + childStack = stack + stacksize; +#ifdef __ia64__ + cpid = __clone2(lxcContainerDummyChild, stack, stacksize, flags, NULL); +#else cpid = clone(lxcContainerDummyChild, childStack, flags, NULL); +#endif VIR_FREE(stack); if (cpid < 0) { char ebuf[1024] ATTRIBUTE_UNUSED;