summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux/linux_sysvec.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-02-07 18:37:51 +0000
committerjhb <jhb@FreeBSD.org>2005-02-07 18:37:51 +0000
commitd92d6a0f9f77afe0c9fed1050b4b24a18f74ab01 (patch)
tree5f555866e0e081341321cfb5b03931cb500ea58c /sys/i386/linux/linux_sysvec.c
parent2e8b9720fa54a4b671edaffba02b3df6efc48dc0 (diff)
downloadFreeBSD-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/linux_sysvec.c')
-rw-r--r--sys/i386/linux/linux_sysvec.c13
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);
OpenPOWER on IntegriCloud