mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-01 12:19:28 +00:00
Fix the inconsistent tabbing.
Noticed by: bde
This commit is contained in:
parent
acb3b7c668
commit
d065e13dc2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=187964
@ -780,17 +780,19 @@ exec_linux_imgact_try(struct image_params *imgp)
|
||||
if (((const short *)head)[0] == SHELLMAGIC) {
|
||||
/*
|
||||
* Run our normal shell image activator. If it succeeds attempt
|
||||
* to use the alternate path for the interpreter. If an alternate
|
||||
* path is found, use our stringspace to store it.
|
||||
* to use the alternate path for the interpreter. If an
|
||||
* alternate * path is found, use our stringspace to store it.
|
||||
*/
|
||||
if ((error = exec_shell_imgact(imgp)) == 0) {
|
||||
linux_emul_convpath(FIRST_THREAD_IN_PROC(imgp->proc),
|
||||
imgp->interpreter_name, UIO_SYSSPACE, &rpath, 0, AT_FDCWD);
|
||||
imgp->interpreter_name, UIO_SYSSPACE, &rpath, 0,
|
||||
AT_FDCWD);
|
||||
if (rpath != NULL) {
|
||||
len = strlen(rpath) + 1;
|
||||
|
||||
if (len <= MAXSHELLCMDLEN) {
|
||||
memcpy(imgp->interpreter_name, rpath, len);
|
||||
memcpy(imgp->interpreter_name, rpath,
|
||||
len);
|
||||
}
|
||||
free(rpath, M_TEMP);
|
||||
}
|
||||
@ -882,23 +884,24 @@ linux_copyout_strings(struct image_params *imgp)
|
||||
* 'AT_COUNT*2' is size for the ELF Auxargs data. This is for
|
||||
* lower compatibility.
|
||||
*/
|
||||
imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size
|
||||
: (AT_COUNT * 2);
|
||||
imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size :
|
||||
(AT_COUNT * 2);
|
||||
/*
|
||||
* The '+ 2' is for the null pointers at the end of each of
|
||||
* the arg and env vector sets,and imgp->auxarg_size is room
|
||||
* for argument of Runtime loader.
|
||||
*/
|
||||
vectp = (u_int32_t *) (destp - (imgp->args->argc + imgp->args->envc + 2 +
|
||||
imgp->auxarg_size) * sizeof(u_int32_t));
|
||||
vectp = (u_int32_t *) (destp - (imgp->args->argc +
|
||||
imgp->args->envc + 2 + imgp->auxarg_size) *
|
||||
sizeof(u_int32_t));
|
||||
|
||||
} else
|
||||
/*
|
||||
* The '+ 2' is for the null pointers at the end of each of
|
||||
* the arg and env vector sets
|
||||
*/
|
||||
vectp = (u_int32_t *)
|
||||
(destp - (imgp->args->argc + imgp->args->envc + 2) * sizeof(u_int32_t));
|
||||
vectp = (u_int32_t *)(destp - (imgp->args->argc +
|
||||
imgp->args->envc + 2) * sizeof(u_int32_t));
|
||||
|
||||
/*
|
||||
* vectp also becomes our initial stack base
|
||||
@ -1080,12 +1083,12 @@ linux_elf_modevent(module_t mod, int type, void *data)
|
||||
sx_init(&emul_shared_lock, "emuldata->shared lock");
|
||||
LIST_INIT(&futex_list);
|
||||
sx_init(&futex_sx, "futex protection lock");
|
||||
linux_exit_tag = EVENTHANDLER_REGISTER(process_exit, linux_proc_exit,
|
||||
NULL, 1000);
|
||||
linux_schedtail_tag = EVENTHANDLER_REGISTER(schedtail, linux_schedtail,
|
||||
NULL, 1000);
|
||||
linux_exec_tag = EVENTHANDLER_REGISTER(process_exec, linux_proc_exec,
|
||||
NULL, 1000);
|
||||
linux_exit_tag = EVENTHANDLER_REGISTER(process_exit,
|
||||
linux_proc_exit, NULL, 1000);
|
||||
linux_schedtail_tag = EVENTHANDLER_REGISTER(schedtail,
|
||||
linux_schedtail, NULL, 1000);
|
||||
linux_exec_tag = EVENTHANDLER_REGISTER(process_exec,
|
||||
linux_proc_exec, NULL, 1000);
|
||||
if (bootverbose)
|
||||
printf("Linux ELF exec handler installed\n");
|
||||
} else
|
||||
|
Loading…
Reference in New Issue
Block a user