diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-01-09 22:27:13 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-01-09 22:27:13 +0000 |
commit | 332a483dedd5c976b45635d3ef8337dfdd377f08 (patch) | |
tree | bcd0800a8732b7099fd64ce366155836b0f6e6ce /sys/kern | |
parent | c88cb37963768d4ddbf78335478986b31599e25a (diff) |
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')
-rw-r--r-- | sys/kern/init_main.c | 12 | ||||
-rw-r--r-- | sys/kern/kern_subr.c | 8 |
2 files changed, 13 insertions, 7 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. diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index 0340d940069..3292e79a352 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_subr.c,v 1.22 2002/07/12 13:31:20 art Exp $ */ +/* $OpenBSD: kern_subr.c,v 1.23 2003/01/09 22:27:12 miod Exp $ */ /* $NetBSD: kern_subr.c,v 1.15 1996/04/09 17:21:56 ragge Exp $ */ /* @@ -141,8 +141,12 @@ again: switch (uio->uio_segflg) { case UIO_USERSPACE: - if (subyte(iov->iov_base, c) < 0) + { + char tmp = c; + + if (copyout(&tmp, iov->iov_base, sizeof(char)) != 0) return (EFAULT); + } break; case UIO_SYSSPACE: |