summaryrefslogtreecommitdiff
path: root/sys/compat/svr4/svr4_exec.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1998-02-22 01:08:00 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1998-02-22 01:08:00 +0000
commit3198f0ab31dac72a4422e72ec3b045b5eaa04797 (patch)
tree6cefa4857fe19f5278cfa40cf4aaba2f28830748 /sys/compat/svr4/svr4_exec.c
parent8e13cb95000ebf76f3d6b9e351d5dd640a053b17 (diff)
Remember OS tag when running Linux or SVR4 ELF files. KNF.
Diffstat (limited to 'sys/compat/svr4/svr4_exec.c')
-rw-r--r--sys/compat/svr4/svr4_exec.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/compat/svr4/svr4_exec.c b/sys/compat/svr4/svr4_exec.c
index e42f6d8053c..74accff8529 100644
--- a/sys/compat/svr4/svr4_exec.c
+++ b/sys/compat/svr4/svr4_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_exec.c,v 1.5 1996/09/13 17:09:53 niklas Exp $ */
+/* $OpenBSD: svr4_exec.c,v 1.6 1998/02/22 01:07:58 niklas Exp $ */
/* $NetBSD: svr4_exec.c,v 1.16 1995/10/14 20:24:20 christos Exp $ */
/*
@@ -36,6 +36,7 @@
#include <sys/namei.h>
#include <sys/vnode.h>
#include <sys/exec_elf.h>
+#include <sys/exec_olf.h>
#include <sys/mman.h>
#include <vm/vm.h>
@@ -85,8 +86,8 @@ svr4_copyargs(pack, arginfo, stack, argp)
{
AuxInfo *a;
- if (!(a = (AuxInfo *) elf_copyargs(pack, arginfo, stack, argp)))
- return NULL;
+ if (!(a = (AuxInfo *)elf_copyargs(pack, arginfo, stack, argp)))
+ return (NULL);
#ifdef SVR4_COMPAT_SOLARIS2
if (pack->ep_emul_arg) {
a->au_id = AUX_sun_uid;
@@ -106,15 +107,16 @@ svr4_copyargs(pack, arginfo, stack, argp)
a++;
}
#endif
- return a;
+ return (a);
}
int
-svr4_elf_probe(p, epp, itp, pos)
+svr4_elf_probe(p, epp, itp, pos, os)
struct proc *p;
struct exec_package *epp;
char *itp;
u_long *pos;
+ u_int8_t *os;
{
char *bp;
int error;
@@ -122,12 +124,13 @@ svr4_elf_probe(p, epp, itp, pos)
if (itp[0]) {
if ((error = emul_find(p, NULL, svr4_emul_path, itp, &bp, 0)))
- return error;
+ return (error);
if ((error = copystr(bp, itp, MAXPATHLEN, &len)))
- return error;
+ return (error);
free(bp, M_TEMP);
}
epp->ep_emul = &emul_svr4;
*pos = SVR4_INTERP_ADDR;
- return 0;
+ *os = OOS_SVR4;
+ return (0);
}