Permalink
Browse files

Call out to pivot_root on ARM

This is probably wrong.  Need to look into that.
  • Loading branch information...
lyda committed Oct 9, 2015
1 parent 7b15618 commit ab4708e5661fc984b50db0e465d689e7b7ba76ef
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/linux/fs.cpp
View
@@ -375,6 +375,12 @@ 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 __ARM_EABI__
// TODO(lyda) Need to get more info on this. I see two possibilities here
// from /usr/include:
// /usr/include/asm-generic/unistd.h:#define __NR_pivot_root 41
// /usr/include/arm-linux-gnueabihf/asm/unistd.h:#define __NR_pivot_root (__NR_SYSCALL_BASE+218)
int ret = ::syscall(218, newRoot.c_str(), putOld.c_str());

This comment has been minimized.

Show comment
Hide comment
@haosdent

haosdent Apr 24, 2016

Contributor

This one is incorrect. In arm_strong mode, it is 9437402.

@haosdent

haosdent Apr 24, 2016

Contributor

This one is incorrect. In arm_strong mode, it is 9437402.

#else
#error "pivot_root is not available"
#endif

0 comments on commit ab4708e

Please sign in to comment.