diff options
| author | Peter Wemm <peter@FreeBSD.org> | 1999-07-09 19:10:14 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 1999-07-09 19:10:14 +0000 |
| commit | bdbc8c265ec72de3b23f6e6f5a92178ab13e09cd (patch) | |
| tree | 87469345d00447de78f7dbc01400071ed8f690a0 /sys | |
| parent | c6bb4a64b83020b8266a5f54099ec1c3d5cfa5ff (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/imgact_elf.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 1e7ab63707c5b..36ade489cebae 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: imgact_elf.c,v 1.59 1999/07/05 18:38:29 marcel Exp $ + * $Id: imgact_elf.c,v 1.60 1999/07/09 18:05:03 peter Exp $ */ #include "opt_rlimit.h" @@ -72,7 +72,7 @@ __ElfType(Auxargs); static int elf_check_header __P((const Elf_Ehdr *hdr)); static int elf_freebsd_fixup __P((long **stack_base, struct image_params *imgp)); -static int elf_load_file __P((struct proc *p, char *file, u_long *addr, +static int elf_load_file __P((struct proc *p, const char *file, u_long *addr, u_long *entry)); static int elf_load_section __P((struct proc *p, struct vmspace *vmspace, struct vnode *vp, @@ -297,7 +297,7 @@ elf_load_section(struct proc *p, struct vmspace *vmspace, struct vnode *vp, vm_o * the entry point for the loaded file. */ static int -elf_load_file(struct proc *p, char *file, u_long *addr, u_long *entry) +elf_load_file(struct proc *p, const char *file, u_long *addr, u_long *entry) { const Elf_Ehdr *hdr = NULL; const Elf_Phdr *phdr = NULL; @@ -588,11 +588,9 @@ exec_elf_imgact(struct image_params *imgp) brand_info->emul_path, interp); if ((error = elf_load_file(imgp->proc, path, &addr, &imgp->entry_addr)) != 0) { - snprintf(path, sizeof(path), "%s", interp); - if ((error = elf_load_file(imgp->proc, path, &addr, + if ((error = elf_load_file(imgp->proc, interp, &addr, &imgp->entry_addr)) != 0) { - uprintf("ELF interpreter %s not found\n", - path); + uprintf("ELF interpreter %s not found\n", path); goto fail; } } |
