You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/04/26 21:15:35 UTC
mesos git commit: Fixed 'pivot_root is not available' error on ARM.
Repository: mesos
Updated Branches:
refs/heads/master dc8b9a4ab -> befae171c
Fixed 'pivot_root is not available' error on ARM.
Review: https://reviews.apache.org/r/46610/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/befae171
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/befae171
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/befae171
Branch: refs/heads/master
Commit: befae171cbcbb4961d5ace319ec3b580405be147
Parents: dc8b9a4
Author: Tomasz Janiszewski <ja...@gmail.com>
Authored: Tue Apr 26 12:15:11 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Tue Apr 26 12:15:11 2016 -0700
----------------------------------------------------------------------
src/linux/fs.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/befae171/src/linux/fs.cpp
----------------------------------------------------------------------
diff --git a/src/linux/fs.cpp b/src/linux/fs.cpp
index 2087b4a..81f040e 100644
--- a/src/linux/fs.cpp
+++ b/src/linux/fs.cpp
@@ -439,6 +439,16 @@ 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 __thumb__
+ // A workaround for arm thumb mode. The magic number '218' is the syscall
+ // number for 'pivot_root' on the arm thumb mode, see
+ // https://w3challs.com/syscalls/?arch=arm_thumb
+ int ret = ::syscall(218, newRoot.c_str(), putOld.c_str());
+#elif __arm__
+ // A workaround for arm. The magic number '9437402' is the syscall
+ // number for 'pivot_root' on the arm architecture, see
+ // https://w3challs.com/syscalls/?arch=arm_strong
+ int ret = ::syscall(9437402, 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