Use fn arg in pivot_root _clone instead of hardcoding everywhere

The only use of this _clone function passes in the same function that was
hardcoded, so this doesn't change any functionality.

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
This commit is contained in:
Ryan Lee 2024-11-05 12:11:10 -08:00
parent 823d14df80
commit d273055ebf

View file

@ -86,10 +86,10 @@ static pid_t _clone(int (*fn)(void *), void *arg)
void *stack = alloca(stack_size);
#ifdef __ia64__
return __clone2(pivot_and_verify_label, stack, stack_size,
return __clone2(fn, stack, stack_size,
CLONE_NEWNS | SIGCHLD, arg);
#else
return clone(pivot_and_verify_label, stack + stack_size,
return clone(fn, stack + stack_size,
CLONE_NEWNS | SIGCHLD, arg);
#endif
}