1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-09 13:42:56 +00:00

Remove unneeded conditionals for sv_ functions - all the ABIs

(apart from null_sysvec) define them, so the 'else' branch is
never taken.

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D19889
This commit is contained in:
Edward Tomasz Napierala 2019-04-12 14:18:16 +00:00
parent 323ad38632
commit 91ff2d4883
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346151

View File

@ -679,23 +679,14 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p)
sys_cap_enter(td, NULL);
/*
* Copy out strings (args and env) and initialize stack base
* Copy out strings (args and env) and initialize stack base.
*/
if (p->p_sysent->sv_copyout_strings)
stack_base = (*p->p_sysent->sv_copyout_strings)(imgp);
else
stack_base = exec_copyout_strings(imgp);
stack_base = (*p->p_sysent->sv_copyout_strings)(imgp);
/*
* If custom stack fixup routine present for this process
* let it do the stack setup.
* Else stuff argument count as first item on stack
* Stack setup.
*/
if (p->p_sysent->sv_fixup != NULL)
error = (*p->p_sysent->sv_fixup)(&stack_base, imgp);
else
error = suword(--stack_base, imgp->args->argc) == 0 ?
0 : EFAULT;
error = (*p->p_sysent->sv_fixup)(&stack_base, imgp);
if (error != 0) {
vn_lock(imgp->vp, LK_SHARED | LK_RETRY);
goto exec_fail_dealloc;
@ -880,11 +871,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p)
#endif
/* Set values passed into the program in registers. */
if (p->p_sysent->sv_setregs)
(*p->p_sysent->sv_setregs)(td, imgp,
(u_long)(uintptr_t)stack_base);
else
exec_setregs(td, imgp, (u_long)(uintptr_t)stack_base);
(*p->p_sysent->sv_setregs)(td, imgp, (u_long)(uintptr_t)stack_base);
vfs_mark_atime(imgp->vp, td->td_ucred);