diff options
| author | 2003-01-09 22:27:03 +0000 | |
|---|---|---|
| committer | 2003-01-09 22:27:03 +0000 | |
| commit | 1de66d4ea4bc89d59720e1faec08dcb28609099b (patch) | |
| tree | c4fec64cf0222ec838a5c6a3208cf582a5d41e4c /sys/kern/init_main.c | |
| parent | on user trap space mismatch just kill the offender, panic the kernel otherwise (diff) | |
| download | wireguard-openbsd-1de66d4ea4bc89d59720e1faec08dcb28609099b.tar.xz wireguard-openbsd-1de66d4ea4bc89d59720e1faec08dcb28609099b.zip | |
Remove fetch(9) and store(9) functions from the kernel, and replace the few
remaining instances of them with appropriate copy(9) usage.
ok art@, tested on all arches unless my memory is non-ECC
Diffstat (limited to 'sys/kern/init_main.c')
| -rw-r--r-- | sys/kern/init_main.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 2c9a0706a8f..bdff699bdb1 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_main.c,v 1.99 2003/01/01 21:05:36 pvalchev Exp $ */ +/* $OpenBSD: init_main.c,v 1.100 2003/01/09 22:27:12 miod Exp $ */ /* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */ /* @@ -480,7 +480,8 @@ start_init(arg) syscallarg(char **) argp; syscallarg(char **) envp; } */ args; - int options, i, error; + int options, error; + long i; register_t retval[2]; char flags[4], *flagsp; char **pathp, *path, *ucp, **uap, *arg0, *arg1 = NULL; @@ -572,10 +573,11 @@ start_init(arg) /* * Move out the arg pointers. */ - (void)suword((caddr_t)--uap, 0); /* terminator */ + i = 0; + copyout(&i, (caddr_t)--uap, sizeof(register_t)); /* terminator */ if (options != 0) - (void)suword((caddr_t)--uap, (long)arg1); - (void)suword((caddr_t)--uap, (long)arg0); + copyout(&arg1, (caddr_t)--uap, sizeof(register_t)); + copyout(&arg0, (caddr_t)--uap, sizeof(register_t)); /* * Point at the arguments. |
