bsd-user: correct notion of return value
PATCH 2/2 bsd-user: correct notion of return value
Fix EFAULT at startup.
Signed-off-by Maya Rashish <[email protected]>
--- bsd-user/netbsd/target_os_stack.h | 2 +- bsd-user/openbsd/target_os_stack.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
bsd-user/netbsd/target_os_stack.h +1 -1
@@ -40,7 +40,7 @@ static inline int setup_initial_stack(struct bsd_binprm *bprm, abi_ulong *p,for (i =0 ; i <MAX_ARG_PAGES ; i++) {if (bprm->page[i]) { info->rss++; -if (!memcpy_to_target (stack_base, bprm->page[i], +if (memcpy_to_target (stack_base, bprm->page[i],TARGET_PAGE_SIZE )) { errno =EFAULT ;return -1 ;
bsd-user/openbsd/target_os_stack.h +1 -1
@@ -40,7 +40,7 @@ static inline int setup_initial_stack(struct bsd_binprm *bprm, abi_ulong *p,for (i =0 ; i <MAX_ARG_PAGES ; i++) {if (bprm->page[i]) { info->rss++; -if (!memcpy_to_target (stack_base, bprm->page[i], +if (memcpy_to_target (stack_base, bprm->page[i],TARGET_PAGE_SIZE )) { errno =EFAULT ;return -1 ;
Signature · 1 line
2.35.1