You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/04/05 19:07:21 UTC

mesos git commit: Fix 'pivot_root is not available' error on powerpc platform.

Repository: mesos
Updated Branches:
  refs/heads/master 5fcc857ef -> 7c6fb3728


Fix 'pivot_root is not available' error on powerpc platform.

Review: https://reviews.apache.org/r/45734/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7c6fb372
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7c6fb372
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7c6fb372

Branch: refs/heads/master
Commit: 7c6fb37280b81e6cf63878efec37b45fb27e4760
Parents: 5fcc857
Author: Zhiwei Chen <zh...@gmail.com>
Authored: Tue Apr 5 10:07:05 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Tue Apr 5 10:07:05 2016 -0700

----------------------------------------------------------------------
 src/linux/fs.cpp | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/7c6fb372/src/linux/fs.cpp
----------------------------------------------------------------------
diff --git a/src/linux/fs.cpp b/src/linux/fs.cpp
index 306beab..2087b4a 100644
--- a/src/linux/fs.cpp
+++ b/src/linux/fs.cpp
@@ -439,6 +439,11 @@ Try<Nothing> pivot_root(
   // 'pivot_root' on the x86_64 architecture, see
   // arch/x86/syscalls/syscall_64.tbl
   int ret = ::syscall(155, newRoot.c_str(), putOld.c_str());
+#elif __powerpc__ || __ppc__ || __powerpc64__ || __ppc64__
+  // A workaround for powerpc. The magic number '203' is the syscall
+  // number for 'pivot_root' on the powerpc architecture, see
+  // https://w3challs.com/syscalls/?arch=powerpc_64
+  int ret = ::syscall(203, newRoot.c_str(), putOld.c_str());
 #else
 #error "pivot_root is not available"
 #endif