diff options
author | jhb <jhb@FreeBSD.org> | 2005-02-07 18:37:51 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-02-07 18:37:51 +0000 |
commit | d92d6a0f9f77afe0c9fed1050b4b24a18f74ab01 (patch) | |
tree | 5f555866e0e081341321cfb5b03931cb500ea58c /sys/i386/linux | |
parent | 2e8b9720fa54a4b671edaffba02b3df6efc48dc0 (diff) | |
download | FreeBSD-src-d92d6a0f9f77afe0c9fed1050b4b24a18f74ab01.zip FreeBSD-src-d92d6a0f9f77afe0c9fed1050b4b24a18f74ab01.tar.gz |
Use linux_emul_convpath() rather than linux_emul_find() as
linux_emul_find() is going away.
Diffstat (limited to 'sys/i386/linux')
-rw-r--r-- | sys/i386/linux/linux_sysvec.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 34b4c49..c20556f 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -738,7 +738,8 @@ static int exec_linux_imgact_try(struct image_params *imgp) { const char *head = (const char *)imgp->image_header; - int error = -1; + char *rpath; + int error = -1, len; /* * The interpreter for shell scripts run from a linux binary needs @@ -752,12 +753,10 @@ exec_linux_imgact_try(struct image_params *imgp) * path is found, use our stringspace to store it. */ if ((error = exec_shell_imgact(imgp)) == 0) { - char *rpath = NULL; - - linux_emul_find(FIRST_THREAD_IN_PROC(imgp->proc), NULL, - imgp->interpreter_name, &rpath, 0); - if (rpath != imgp->interpreter_name) { - int len = strlen(rpath) + 1; + linux_emul_convpath(FIRST_THREAD_IN_PROC(imgp->proc), + imgp->interpreter_name, UIO_SYSSPACE, &rpath, 0); + if (rpath != NULL) { + len = strlen(rpath) + 1; if (len <= MAXSHELLCMDLEN) { memcpy(imgp->interpreter_name, rpath, len); |