From c6bb4a64b83020b8266a5f54099ec1c3d5cfa5ff Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Fri, 9 Jul 1999 18:05:03 +0000 Subject: [PATCH] Minor tweak - don't cause a warning. I don't know if it was intentional or not, but it would have printed out: /compat/linux/foo/bar.so: interpreter not found If it was, then I've broken it. De-constifying the 'interp' variable or carrying the constness through to elf_load_file() are alternatives. --- sys/kern/imgact_elf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 36f582ba5df..1e7ab63707c 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.58 1999/05/17 00:53:38 alc Exp $ + * $Id: imgact_elf.c,v 1.59 1999/07/05 18:38:29 marcel Exp $ */ #include "opt_rlimit.h" @@ -588,7 +588,8 @@ 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) { - if ((error = elf_load_file(imgp->proc, interp, &addr, + snprintf(path, sizeof(path), "%s", interp); + if ((error = elf_load_file(imgp->proc, path, &addr, &imgp->entry_addr)) != 0) { uprintf("ELF interpreter %s not found\n", path);