2014-05-06 20:02:27 +02:00
|
|
|
Index: libvirt-1.2.4/src/lxc/lxc_container.c
|
2009-01-29 01:42:42 +01:00
|
|
|
===================================================================
|
2014-05-06 20:02:27 +02:00
|
|
|
--- libvirt-1.2.4.orig/src/lxc/lxc_container.c
|
|
|
|
+++ libvirt-1.2.4/src/lxc/lxc_container.c
|
2014-04-08 19:20:15 +02:00
|
|
|
@@ -164,12 +164,19 @@ int lxcContainerHasReboot(void)
|
2013-02-25 19:49:59 +01:00
|
|
|
VIR_FREE(buf);
|
|
|
|
cmd = v ? LINUX_REBOOT_CMD_CAD_ON : LINUX_REBOOT_CMD_CAD_OFF;
|
|
|
|
|
|
|
|
+#ifdef __ia64__
|
|
|
|
+ stacksize *= 2;
|
|
|
|
+#endif
|
2013-12-06 19:39:18 +01:00
|
|
|
if (VIR_ALLOC_N(stack, stacksize) < 0)
|
2013-02-25 19:49:59 +01:00
|
|
|
return -1;
|
|
|
|
|
2013-12-06 19:39:18 +01:00
|
|
|
childStack = stack + stacksize;
|
2013-02-25 19:49:59 +01:00
|
|
|
|
|
|
|
+#ifdef __ia64__
|
2013-07-30 22:33:47 +02:00
|
|
|
+ cpid = __clone2(lxcContainerRebootChild, childStack, stacksize, flags, &cmd);
|
2013-02-25 19:49:59 +01:00
|
|
|
+#else
|
|
|
|
cpid = clone(lxcContainerRebootChild, childStack, flags, &cmd);
|
|
|
|
+#endif
|
|
|
|
VIR_FREE(stack);
|
|
|
|
if (cpid < 0) {
|
|
|
|
virReportSystemError(errno, "%s",
|
2014-04-08 19:20:15 +02:00
|
|
|
@@ -2007,6 +2014,9 @@ int lxcContainerStart(virDomainDefPtr de
|
2013-12-06 19:39:18 +01:00
|
|
|
.handshakefd = handshakefd
|
|
|
|
};
|
|
|
|
|
|
|
|
+#ifdef __ia64__
|
|
|
|
+ stacksize *= 2;
|
|
|
|
+#endif
|
|
|
|
/* allocate a stack for the container */
|
|
|
|
if (VIR_ALLOC_N(stack, stacksize) < 0)
|
|
|
|
return -1;
|
2014-04-08 19:20:15 +02:00
|
|
|
@@ -2032,7 +2042,11 @@ int lxcContainerStart(virDomainDefPtr de
|
2011-08-04 19:12:20 +02:00
|
|
|
cflags |= CLONE_NEWNET;
|
2010-03-22 17:06:05 +01:00
|
|
|
}
|
2008-10-26 00:53:14 +02:00
|
|
|
|
|
|
|
+#ifdef __ia64__
|
2013-07-30 22:33:47 +02:00
|
|
|
+ pid = __clone2(lxcContainerChild, stacktop, stacksize, cflags, &args);
|
2008-10-26 00:53:14 +02:00
|
|
|
+#else
|
2011-08-04 19:12:20 +02:00
|
|
|
pid = clone(lxcContainerChild, stacktop, cflags, &args);
|
2008-10-26 00:53:14 +02:00
|
|
|
+#endif
|
|
|
|
VIR_FREE(stack);
|
2011-03-31 22:22:32 +02:00
|
|
|
VIR_DEBUG("clone() completed, new container PID is %d", pid);
|
2008-10-26 00:53:14 +02:00
|
|
|
|
2014-04-08 19:20:15 +02:00
|
|
|
@@ -2066,12 +2080,19 @@ int lxcContainerAvailable(int features)
|
2008-10-26 00:53:14 +02:00
|
|
|
if (features & LXC_CONTAINER_FEATURE_NET)
|
|
|
|
flags |= CLONE_NEWNET;
|
|
|
|
|
|
|
|
+#ifdef __ia64__
|
|
|
|
+ stacksize *= 2;
|
|
|
|
+#endif
|
2013-12-06 19:39:18 +01:00
|
|
|
if (VIR_ALLOC_N(stack, stacksize) < 0)
|
2008-10-26 00:53:14 +02:00
|
|
|
return -1;
|
|
|
|
|
2013-12-06 19:39:18 +01:00
|
|
|
childStack = stack + stacksize;
|
2008-10-26 00:53:14 +02:00
|
|
|
|
|
|
|
+#ifdef __ia64__
|
2013-07-30 22:33:47 +02:00
|
|
|
+ cpid = __clone2(lxcContainerDummyChild, childStack, stacksize, flags, NULL);
|
2008-10-26 00:53:14 +02:00
|
|
|
+#else
|
|
|
|
cpid = clone(lxcContainerDummyChild, childStack, flags, NULL);
|
|
|
|
+#endif
|
|
|
|
VIR_FREE(stack);
|
|
|
|
if (cpid < 0) {
|
2011-11-10 02:55:47 +01:00
|
|
|
char ebuf[1024] ATTRIBUTE_UNUSED;
|