Le 12/10/2020 à 09:14, David Leonard a écrit : > > Tested on Ubuntu 20.04 x86_64 against arm-linux-gnueabi toolchain. > > Signed-off-by: David Leonard <david.leon...@digi.com> > --- > linux-user/syscall.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 897d20c076..8143c8c280 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -345,6 +345,10 @@ _syscall5(int, kcmp, pid_t, pid1, pid_t, pid2, int, type, > unsigned long, idx1, unsigned long, idx2) > #endif > > +#if defined(TARGET_NR_pivot_root) && defined(__NR_pivot_root) > +_syscall2(int, pivot_root, const char *, new_root, const char *, put_old) > +#endif > + > /* > * It is assumed that struct statx is architecture independent. > */ > @@ -8834,6 +8838,22 @@ static abi_long do_syscall1(void *cpu_env, int num, > abi_long arg1, > ret = get_errno(umount2(p, arg2)); > unlock_user(p, arg1, 0); > return ret; > +#endif > +#if defined(TARGET_NR_pivot_root) && defined(__NR_pivot_root) > + case TARGET_NR_pivot_root: > + { > + void *p2; > + p = lock_user_string(arg1); > + p2 = lock_user_string(arg2); > + if (!p || !p2) { > + ret = -TARGET_EFAULT; > + } else { > + ret = get_errno(pivot_root(p, p2)); > + } > + unlock_user(p2, arg2, 0); > + unlock_user(p, arg1, 0); > + } > + return ret; > #endif > case TARGET_NR_ioctl: > return do_ioctl(arg1, arg2, arg3);
Reviewed-by: Laurent Vivier <laur...@vivier.eu> Please, re-send you patch to qemu-devel@nongnu.org Thanks, Laurent