git://git.onelab.eu
/
util-vserver-pl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1a82c7c
)
just try to make older util-vserver-pl compile.
author
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Tue, 31 Aug 2010 16:39:11 +0000
(18:39 +0200)
committer
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Tue, 31 Aug 2010 16:39:11 +0000
(18:39 +0200)
src/planetlab.c
patch
|
blob
|
history
diff --git
a/src/planetlab.c
b/src/planetlab.c
index
73ccfc3
..
efbb306
100644
(file)
--- a/
src/planetlab.c
+++ b/
src/planetlab.c
@@
-99,10
+99,17
@@
tag:
if (vc_ctx_create(ctx, 0) == VC_NOCTX)
return -1;
if (vc_ctx_create(ctx, 0) == VC_NOCTX)
return -1;
-
if (unshare_flags != 0) {
+ if (unshare_flags != 0) {
unshare(unshare_flags);
unshare_flags |= vc_get_space_mask();
unshare(unshare_flags);
unshare_flags |= vc_get_space_mask();
+#ifdef VC_VXC_NAMESPACE
+ /* this is a hack to make util-vserver-pl compile with
+ util-vserver-0.30.216, which changes the signature for
+ vc_{set,enter}_namespace functions. */
+ vc_set_namespace(ctx, unshare_flags, NULL);
+#else
vc_set_namespace(ctx, unshare_flags);
vc_set_namespace(ctx, unshare_flags);
+#endif
}
/* Set capabilities - these don't take effect until SETUP flag is unset */
}
/* Set capabilities - these don't take effect until SETUP flag is unset */
@@
-199,7
+206,14
@@
pl_chcontext(xid_t ctx, uint64_t bcaps, const struct sliver_resources *slr)
unshare_flags = get_space_flag(ctx);
if (unshare_flags != 0) {
unshare_flags |=vc_get_space_mask();
unshare_flags = get_space_flag(ctx);
if (unshare_flags != 0) {
unshare_flags |=vc_get_space_mask();
+#ifdef VC_VXC_NAMESPACE
+ /* this is a hack to make util-vserver-pl compile with
+ util-vserver-0.30.216, which changes the signature for
+ vc_{set,enter}_namespace functions. */
+ vc_enter_namespace(ctx, unshare_flags, NULL);
+#else
vc_enter_namespace(ctx, unshare_flags);
vc_enter_namespace(ctx, unshare_flags);
+#endif
}
if (!vc_tag_migrate(ctx) && !vc_ctx_migrate(ctx, 0))
}
if (!vc_tag_migrate(ctx) && !vc_ctx_migrate(ctx, 0))