aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/alpha/linux/linux_sysvec.c4
-rw-r--r--sys/compat/linux/linux_util.c6
-rw-r--r--sys/compat/linux/linux_util.h6
-rw-r--r--sys/i386/linux/linux_sysvec.c4
4 files changed, 9 insertions, 11 deletions
diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c
index 7264dca45f27..6dd3ee5f9efc 100644
--- a/sys/alpha/linux/linux_sysvec.c
+++ b/sys/alpha/linux/linux_sysvec.c
@@ -153,8 +153,8 @@ exec_linux_imgact_try(imgp)
if ((error = exec_shell_imgact(imgp)) == 0) {
char *rpath = NULL;
- linux_emul_find(&imgp->proc->p_thread, NULL,/* XXXKSE */
- linux_emul_path, imgp->interpreter_name, &rpath, 0);
+ linux_emul_find(&imgp->proc->p_thread, NULL,
+ imgp->interpreter_name, &rpath, 0);
if (rpath != imgp->interpreter_name) {
int len = strlen(rpath) + 1;
diff --git a/sys/compat/linux/linux_util.c b/sys/compat/linux/linux_util.c
index 45c85b6cab0b..c30d0f4998fe 100644
--- a/sys/compat/linux/linux_util.c
+++ b/sys/compat/linux/linux_util.c
@@ -50,10 +50,9 @@ const char linux_emul_path[] = "/compat/linux";
* be in exists.
*/
int
-linux_emul_find(td, sgp, prefix, path, pbuf, cflag)
+linux_emul_find(td, sgp, path, pbuf, cflag)
struct thread *td;
caddr_t *sgp; /* Pointer to stackgap memory */
- const char *prefix;
char *path;
char **pbuf;
int cflag;
@@ -63,15 +62,16 @@ linux_emul_find(td, sgp, prefix, path, pbuf, cflag)
struct vattr vat;
struct vattr vatroot;
int error;
+ const char *prefix;
char *ptr, *buf, *cp;
size_t sz, len;
buf = (char *) malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
*pbuf = path;
+ prefix = linux_emul_path;
for (ptr = buf; (*ptr = *prefix) != '\0'; ptr++, prefix++)
continue;
-
sz = MAXPATHLEN - (ptr - buf);
/*
diff --git a/sys/compat/linux/linux_util.h b/sys/compat/linux/linux_util.h
index 43aed1f23b99..e01f26018dd3 100644
--- a/sys/compat/linux/linux_util.h
+++ b/sys/compat/linux/linux_util.h
@@ -76,15 +76,13 @@ stackgap_alloc(sgp, sz)
extern const char linux_emul_path[];
-int linux_emul_find __P((struct thread *, caddr_t *, const char *, char *,
- char **, int));
+int linux_emul_find __P((struct thread *, caddr_t *, char *, char **, int));
#define CHECKALT(p, sgp, path, i) \
do { \
int _error; \
\
- _error = linux_emul_find(p, sgp, linux_emul_path, path, \
- &path, i); \
+ _error = linux_emul_find(p, sgp, path, &path, i); \
if (_error == EFAULT) \
return (_error); \
} while (0)
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index 59ec5e6e1f02..70ea5bdb1cd0 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -745,13 +745,13 @@ exec_linux_imgact_try(imgp)
if ((error = exec_shell_imgact(imgp)) == 0) {
char *rpath = NULL;
- linux_emul_find(&imgp->proc->p_thread, NULL, linux_emul_path,
+ linux_emul_find(&imgp->proc->p_thread, NULL,
imgp->interpreter_name, &rpath, 0);
if (rpath != imgp->interpreter_name) {
int len = strlen(rpath) + 1;
if (len <= MAXSHELLCMDLEN) {
- memcpy(imgp->interpreter_name, rpath, len);
+ memcpy(imgp->interpreter_name, rpath, len);
}
free(rpath, M_TEMP);
}