diff options
Diffstat (limited to 'sys')
35 files changed, 119 insertions, 104 deletions
diff --git a/sys/arch/alpha/alpha/vm_machdep.c b/sys/arch/alpha/alpha/vm_machdep.c index 101ba5edde0..7f64013518e 100644 --- a/sys/arch/alpha/alpha/vm_machdep.c +++ b/sys/arch/alpha/alpha/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.7 1998/03/01 16:12:12 niklas Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.8 1998/07/28 00:13:26 millert Exp $ */ /* $NetBSD: vm_machdep.c,v 1.21 1996/11/13 21:13:15 cgd Exp $ */ /* @@ -86,13 +86,13 @@ cpu_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, (off_t)chdr->c_hdrsize, UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cpustate, sizeof(cpustate), (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (!error) chdr->c_nseg++; diff --git a/sys/arch/amiga/amiga/vm_machdep.c b/sys/arch/amiga/amiga/vm_machdep.c index dc6e1d63c97..aadf76fa8d5 100644 --- a/sys/arch/amiga/amiga/vm_machdep.c +++ b/sys/arch/amiga/amiga/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.7 1998/03/01 15:00:14 niklas Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.8 1998/07/28 00:13:28 millert Exp $ */ /* $NetBSD: vm_machdep.c,v 1.30 1997/05/19 10:14:50 veego Exp $ */ /* @@ -281,13 +281,13 @@ cpu_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, (off_t)chdr->c_hdrsize, UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&md_core, sizeof(md_core), (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (!error) chdr->c_nseg++; diff --git a/sys/arch/arm32/arm32/vm_machdep.c b/sys/arch/arm32/arm32/vm_machdep.c index 209e368e106..e39b3229f0d 100644 --- a/sys/arch/arm32/arm32/vm_machdep.c +++ b/sys/arch/arm32/arm32/vm_machdep.c @@ -544,13 +544,13 @@ cpu_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, (off_t)chdr->c_hdrsize, UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cpustate, sizeof(cpustate), (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; diff --git a/sys/arch/atari/atari/vm_machdep.c b/sys/arch/atari/atari/vm_machdep.c index 70955e43434..c5742798609 100644 --- a/sys/arch/atari/atari/vm_machdep.c +++ b/sys/arch/atari/atari/vm_machdep.c @@ -272,13 +272,13 @@ cpu_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, (off_t)chdr->c_hdrsize, UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&md_core, sizeof(md_core), (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (!error) chdr->c_nseg++; diff --git a/sys/arch/hp300/hp300/vm_machdep.c b/sys/arch/hp300/hp300/vm_machdep.c index 1e06bbae5ca..bb54c8c3215 100644 --- a/sys/arch/hp300/hp300/vm_machdep.c +++ b/sys/arch/hp300/hp300/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.10 1997/07/06 08:02:10 downsj Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.11 1998/07/28 00:13:34 millert Exp $ */ /* $NetBSD: vm_machdep.c,v 1.37 1997/05/26 00:27:43 thorpej Exp $ */ /* @@ -176,13 +176,13 @@ cpu_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, (off_t)chdr->c_hdrsize, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, - (int *)0, p); + NULL, p); if (error) return error; error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&md_core, sizeof(md_core), (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)0, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; diff --git a/sys/arch/i386/i386/vm_machdep.c b/sys/arch/i386/i386/vm_machdep.c index e0842336aec..98c132130e4 100644 --- a/sys/arch/i386/i386/vm_machdep.c +++ b/sys/arch/i386/i386/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.12 1996/10/16 23:12:06 deraadt Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.13 1998/07/28 00:13:36 millert Exp $ */ /* $NetBSD: vm_machdep.c,v 1.61 1996/05/03 19:42:35 christos Exp $ */ /*- @@ -249,13 +249,13 @@ cpu_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, (off_t)chdr->c_hdrsize, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, - (int *)0, p); + NULL, p); if (error) return error; error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&md_core, sizeof(md_core), (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)0, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; diff --git a/sys/arch/kbus/kbus/vm_machdep.c b/sys/arch/kbus/kbus/vm_machdep.c index 2e87be31208..56b77a5f768 100644 --- a/sys/arch/kbus/kbus/vm_machdep.c +++ b/sys/arch/kbus/kbus/vm_machdep.c @@ -464,13 +464,13 @@ cpu_coredump(p, vp, cred, chdr) cseg.c_size = chdr->c_cpusize; error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, (off_t)chdr->c_hdrsize, UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&md_core, sizeof(md_core), (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (!error) chdr->c_nseg++; diff --git a/sys/arch/mac68k/mac68k/vm_machdep.c b/sys/arch/mac68k/mac68k/vm_machdep.c index c889ae0f50b..b387023f4b6 100644 --- a/sys/arch/mac68k/mac68k/vm_machdep.c +++ b/sys/arch/mac68k/mac68k/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.9 1998/03/03 04:30:11 ryker Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.10 1998/07/28 00:13:40 millert Exp $ */ /* $NetBSD: vm_machdep.c,v 1.21 1996/09/16 18:00:31 scottr Exp $ */ /* @@ -214,13 +214,13 @@ cpu_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, (off_t)chdr->c_hdrsize, UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&md_core, sizeof(md_core), (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (!error) chdr->c_nseg++; diff --git a/sys/arch/mips/mips/vm_machdep.c b/sys/arch/mips/mips/vm_machdep.c index ef5c74b9be8..44ea62488b3 100644 --- a/sys/arch/mips/mips/vm_machdep.c +++ b/sys/arch/mips/mips/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.2 1998/03/18 12:07:46 pefo Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.3 1998/07/28 00:13:42 millert Exp $ */ /* * Copyright (c) 1988 University of Utah. * Copyright (c) 1992, 1993 @@ -213,7 +213,7 @@ cpu_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, (off_t)chdr->c_hdrsize, UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; @@ -222,7 +222,7 @@ cpu_coredump(p, vp, cred, chdr) (off_t)chdr -> c_cpusize, (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, - cred, (int *)NULL, p); + cred, NULL, p); if (!error) chdr->c_nseg++; diff --git a/sys/arch/mvme68k/mvme68k/vm_machdep.c b/sys/arch/mvme68k/mvme68k/vm_machdep.c index e51c2c5850e..42a81206b20 100644 --- a/sys/arch/mvme68k/mvme68k/vm_machdep.c +++ b/sys/arch/mvme68k/mvme68k/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.8 1997/03/31 00:24:17 downsj Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.9 1998/07/28 00:13:44 millert Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -144,8 +144,7 @@ cpu_coredump(p, vp, cred, chdr) struct core *chdr; { return (vn_rdwr(UIO_WRITE, vp, (caddr_t) p->p_addr, USPACE, - (off_t)0, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, (int *) NULL, - p)); + (off_t)0, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, NULL, p)); } /* diff --git a/sys/arch/mvme88k/mvme88k/vm_machdep.c b/sys/arch/mvme88k/mvme88k/vm_machdep.c index eaba81506db..9436fd59d8a 100644 --- a/sys/arch/mvme88k/mvme88k/vm_machdep.c +++ b/sys/arch/mvme88k/mvme88k/vm_machdep.c @@ -40,7 +40,7 @@ * from: Utah $Hdr: vm_machdep.c 1.21 91/04/06$ * from: @(#)vm_machdep.c 7.10 (Berkeley) 5/7/91 * vm_machdep.c,v 1.3 1993/07/07 07:09:32 cgd Exp - * $Id: vm_machdep.c,v 1.3 1997/03/03 20:21:54 rahnds Exp $ + * $Id: vm_machdep.c,v 1.4 1998/07/28 00:13:46 millert Exp $ */ #include <sys/param.h> @@ -174,8 +174,7 @@ cpu_coredump(struct proc *p, struct vnode *vp, struct ucred *cred, struct core * { return (vn_rdwr(UIO_WRITE, vp, (caddr_t) p->p_addr, ctob(UPAGES), - (off_t)0, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, - p)); + (off_t)0, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, NULL, p)); } /* diff --git a/sys/arch/pc532/pc532/vm_machdep.c b/sys/arch/pc532/pc532/vm_machdep.c index b4a9fc90248..657b3e8270e 100644 --- a/sys/arch/pc532/pc532/vm_machdep.c +++ b/sys/arch/pc532/pc532/vm_machdep.c @@ -195,13 +195,13 @@ cpu_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, (off_t)chdr->c_hdrsize, UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cpustate, sizeof(cpustate), (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (!error) chdr->c_nseg++; diff --git a/sys/arch/pmax/pmax/vm_machdep.c b/sys/arch/pmax/pmax/vm_machdep.c index ac4779e6869..079b33bc47f 100644 --- a/sys/arch/pmax/pmax/vm_machdep.c +++ b/sys/arch/pmax/pmax/vm_machdep.c @@ -217,7 +217,7 @@ cpu_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, (off_t)chdr->c_hdrsize, UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; @@ -225,8 +225,7 @@ cpu_coredump(p, vp, cred, chdr) (caddr_t)(&(p -> p_addr -> u_pcb.pcb_regs)), (off_t)chdr -> c_cpusize, (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), - UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, - cred, (int *)NULL, p); + UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (!error) chdr->c_nseg++; diff --git a/sys/arch/sparc/sparc/vm_machdep.c b/sys/arch/sparc/sparc/vm_machdep.c index 521588c8350..f76109e5c2e 100644 --- a/sys/arch/sparc/sparc/vm_machdep.c +++ b/sys/arch/sparc/sparc/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.5 1997/08/08 08:27:48 downsj Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.6 1998/07/28 00:13:52 millert Exp $ */ /* $NetBSD: vm_machdep.c,v 1.30 1997/03/10 23:55:40 pk Exp $ */ /* @@ -516,13 +516,13 @@ cpu_coredump(p, vp, cred, chdr) cseg.c_size = chdr->c_cpusize; error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, (off_t)chdr->c_hdrsize, UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&md_core, sizeof(md_core), (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (!error) chdr->c_nseg++; diff --git a/sys/arch/sun3/sun3/vm_machdep.c b/sys/arch/sun3/sun3/vm_machdep.c index 94823f93e91..89203485617 100644 --- a/sys/arch/sun3/sun3/vm_machdep.c +++ b/sys/arch/sun3/sun3/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.6 1997/01/16 04:04:36 kstailey Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.7 1998/07/28 00:13:54 millert Exp $ */ /* $NetBSD: vm_machdep.c,v 1.35 1996/04/26 18:38:06 gwr Exp $ */ /* @@ -257,13 +257,13 @@ cpu_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, (off_t)chdr->c_hdrsize, UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)0, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&md_core, sizeof(md_core), (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)0, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; diff --git a/sys/arch/vax/vax/vm_machdep.c b/sys/arch/vax/vax/vm_machdep.c index 1ab71ef300d..1979af06a0e 100644 --- a/sys/arch/vax/vax/vm_machdep.c +++ b/sys/arch/vax/vax/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.12 1997/10/08 07:15:57 niklas Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.13 1998/07/28 00:13:56 millert Exp $ */ /* $NetBSD: vm_machdep.c,v 1.33 1997/07/06 22:38:22 ragge Exp $ */ /* @@ -507,13 +507,13 @@ cpu_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, (off_t)chdr->c_hdrsize, UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) return error; error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&state, sizeof(state), (off_t)(chdr->c_hdrsize + chdr->c_seghdrsize), UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (!error) chdr->c_nseg++; diff --git a/sys/arch/wgrisc/wgrisc/vm_machdep.c b/sys/arch/wgrisc/wgrisc/vm_machdep.c index f27b9b49c3a..769db366156 100644 --- a/sys/arch/wgrisc/wgrisc/vm_machdep.c +++ b/sys/arch/wgrisc/wgrisc/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.1 1997/02/06 16:02:46 pefo Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.2 1998/07/28 00:13:58 millert Exp $ */ /* * Copyright (c) 1988 University of Utah. * Copyright (c) 1992, 1993 @@ -39,7 +39,7 @@ * from: Utah Hdr: vm_machdep.c 1.21 91/04/06 * * from: @(#)vm_machdep.c 8.3 (Berkeley) 1/4/94 - * $Id: vm_machdep.c,v 1.1 1997/02/06 16:02:46 pefo Exp $ + * $Id: vm_machdep.c,v 1.2 1998/07/28 00:13:58 millert Exp $ */ @@ -197,8 +197,7 @@ cpu_coredump(p, vp, cred, core) CPU_SaveCurFPState(p); return (vn_rdwr(UIO_WRITE, vp, (caddr_t)p->p_addr, ctob(UPAGES), - (off_t)0, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, (int *)NULL, - p)); + (off_t)0, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, NULL, p)); } /* diff --git a/sys/compat/ibcs2/ibcs2_exec.c b/sys/compat/ibcs2/ibcs2_exec.c index e874647ef14..77105940c77 100644 --- a/sys/compat/ibcs2/ibcs2_exec.c +++ b/sys/compat/ibcs2/ibcs2_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ibcs2_exec.c,v 1.7 1997/02/01 21:49:48 deraadt Exp $ */ +/* $OpenBSD: ibcs2_exec.c,v 1.8 1998/07/28 00:13:24 millert Exp $ */ /* $NetBSD: ibcs2_exec.c,v 1.12 1996/10/12 02:13:52 thorpej Exp $ */ /* @@ -285,7 +285,8 @@ coff_find_section(p, vp, fp, sh, s_type) struct coff_scnhdr *sh; int s_type; { - int i, pos, resid, siz, error; + int i, pos, error; + size_t siz, resid; pos = COFF_HDR_SIZE; for (i = 0; i < fp->f_nscns; i++, pos += sizeof(struct coff_scnhdr)) { @@ -299,7 +300,7 @@ coff_find_section(p, vp, fp, sh, s_type) } siz -= resid; if (siz != sizeof(struct coff_scnhdr)) { - DPRINTF(("incomplete read: hdr %d ask=%d, rem=%d got %d\n", + DPRINTF(("incomplete read: hdr %d ask=%d, rem=%u got %u\n", s_type, sizeof(struct coff_scnhdr), resid, siz)); return ENOEXEC; @@ -415,7 +416,7 @@ n */ /* load any shared libraries */ error = coff_find_section(p, epp->ep_vp, fp, &sh, COFF_STYP_SHLIB); if (!error) { - int resid; + size_t resid; struct coff_slhdr *slhdr; char buf[128], *bufp; /* FIXME */ int len = sh.s_size, path_index, entry_len; @@ -467,8 +468,8 @@ coff_load_shlib(p, path, epp) char *path; struct exec_package *epp; { - int error, siz, resid; - int taddr, tsize, daddr, dsize, offset; + int error, taddr, tsize, daddr, dsize, offset; + size_t siz, resid; struct nameidata nd; struct coff_filehdr fh, *fhp = &fh; struct coff_scnhdr sh, *shp = &sh; @@ -497,7 +498,7 @@ coff_load_shlib(p, path, epp) } siz -= resid; if (siz != sizeof(struct coff_filehdr)) { - DPRINTF(("coff_load_shlib: incomplete read: ask=%d, rem=%d got %d\n", + DPRINTF(("coff_load_shlib: incomplete read: ask=%d, rem=%u got %u\n", sizeof(struct coff_filehdr), resid, siz)); vrele(nd.ni_vp); return ENOEXEC; @@ -603,7 +604,8 @@ exec_ibcs2_xout_prep_nmagic(p, epp, xp, xep) struct xexec *xp; struct xext *xep; { - int error, resid, nseg, i; + int error, nseg, i; + size_t resid; long baddr, bsize; struct xseg *xs; diff --git a/sys/compat/linux/linux_exec.c b/sys/compat/linux/linux_exec.c index 5d91784f571..453325c84f7 100644 --- a/sys/compat/linux/linux_exec.c +++ b/sys/compat/linux/linux_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_exec.c,v 1.7 1998/03/06 22:14:01 niklas Exp $ */ +/* $OpenBSD: linux_exec.c,v 1.8 1998/07/28 00:13:23 millert Exp $ */ /* $NetBSD: linux_exec.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */ /* @@ -424,7 +424,8 @@ linux_sys_uselib(p, v, retval) struct vnode *vp; struct exec hdr; struct exec_vmcmd_set vcset; - int rem, i, magic, error; + int i, magic, error; + size_t rem; sg = stackgap_init(p->p_emul); LINUX_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index c56713e15df..75c425402e3 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.21 1998/03/06 21:49:50 niklas Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.22 1998/07/28 00:13:02 millert Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -317,7 +317,7 @@ elf_read_from(p, vp, off, buf, size) int size; { int error; - int resid; + size_t resid; if ((error = vn_rdwr(UIO_READ, vp, buf, size, off, UIO_SYSSPACE, IO_NODELOCKED, p->p_ucred, &resid, p)) != 0) diff --git a/sys/kern/exec_subr.c b/sys/kern/exec_subr.c index 20d6204805e..32b93934f81 100644 --- a/sys/kern/exec_subr.c +++ b/sys/kern/exec_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_subr.c,v 1.4 1997/02/24 14:19:56 niklas Exp $ */ +/* $OpenBSD: exec_subr.c,v 1.5 1998/07/28 00:13:01 millert Exp $ */ /* $NetBSD: exec_subr.c,v 1.9 1994/12/04 03:10:42 mycroft Exp $ */ /* @@ -167,7 +167,7 @@ vmcmd_map_readvn(p, cmd) error = vn_rdwr(UIO_READ, cmd->ev_vp, (caddr_t)cmd->ev_addr, cmd->ev_len, cmd->ev_offset, UIO_USERSPACE, IO_UNIT|IO_NODELOCKED, - p->p_ucred, (int *)0, p); + p->p_ucred, NULL, p); if (error) return error; diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index 32421164e78..d2ec5b7f837 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_acct.c,v 1.6 1998/05/17 10:47:35 deraadt Exp $ */ +/* $OpenBSD: kern_acct.c,v 1.7 1998/07/28 00:13:00 millert Exp $ */ /* $NetBSD: kern_acct.c,v 1.42 1996/02/04 02:15:12 christos Exp $ */ /*- @@ -219,8 +219,7 @@ acct_process(p) */ VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE); return (vn_rdwr(UIO_WRITE, vp, (caddr_t)&acct, sizeof (acct), - (off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, p->p_ucred, - (int *)0, p)); + (off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, p->p_ucred, NULL, p)); } /* diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 2dce4a021f4..58a4780ccd0 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_exec.c,v 1.22 1998/07/08 22:28:56 deraadt Exp $ */ +/* $OpenBSD: kern_exec.c,v 1.23 1998/07/28 00:13:05 millert Exp $ */ /* $NetBSD: kern_exec.c,v 1.75 1996/02/09 18:59:28 christos Exp $ */ /*- @@ -95,7 +95,7 @@ check_exec(p, epp) int error, i; struct vnode *vp; struct nameidata *ndp; - int resid; + size_t resid; ndp = epp->ep_ndp; ndp->ni_cnd.cn_nameiop = LOOKUP; diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index 56b07f7d0e7..0f8eb3f76c0 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_subr.c,v 1.5 1998/05/11 05:41:59 deraadt Exp $ */ +/* $OpenBSD: kern_subr.c,v 1.6 1998/07/28 00:13:08 millert Exp $ */ /* $NetBSD: kern_subr.c,v 1.15 1996/04/09 17:21:56 ragge Exp $ */ /* @@ -111,11 +111,19 @@ ureadc(c, uio) { register struct iovec *iov; - if (uio->uio_resid <= 0) - panic("ureadc: non-positive resid"); + if (uio->uio_resid == 0) +#ifdef DIAGNOSTIC + panic("ureadc: zero resid"); +#else + return (EINVAL); +#endif again: if (uio->uio_iovcnt <= 0) +#ifdef DIAGNOSTIC panic("ureadc: non-positive iovcnt"); +#else + return (EINVAL); +#endif iov = uio->uio_iov; if (iov->iov_len <= 0) { uio->uio_iovcnt--; diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 1603e9e4595..fb6cf718aef 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_generic.c,v 1.12 1998/02/09 06:29:07 tholo Exp $ */ +/* $OpenBSD: sys_generic.c,v 1.13 1998/07/28 00:12:58 millert Exp $ */ /* $NetBSD: sys_generic.c,v 1.24 1996/03/29 00:25:32 cgd Exp $ */ /* @@ -102,8 +102,6 @@ sys_read(p, v, retval) auio.uio_rw = UIO_READ; auio.uio_segflg = UIO_USERSPACE; auio.uio_procp = p; - if (auio.uio_resid < 0) - return EINVAL; #ifdef KTRACE /* * if tracing, save a copy of iovec @@ -157,6 +155,8 @@ sys_readv(p, v, retval) (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL || (fp->f_flag & FREAD) == 0) return (EBADF); + if (SCARG(uap, iovcnt) <= 0) + return (EINVAL); /* note: can't use iovlen until iovcnt is validated */ iovlen = SCARG(uap, iovcnt) * sizeof (struct iovec); if (SCARG(uap, iovcnt) > UIO_SMALLIOV) { @@ -252,8 +252,6 @@ sys_write(p, v, retval) auio.uio_rw = UIO_WRITE; auio.uio_segflg = UIO_USERSPACE; auio.uio_procp = p; - if (auio.uio_resid < 0) - return EINVAL; #ifdef KTRACE /* * if tracing, save a copy of iovec @@ -310,6 +308,8 @@ sys_writev(p, v, retval) (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL || (fp->f_flag & FWRITE) == 0) return (EBADF); + if (SCARG(uap, iovcnt) <= 0) + return (EINVAL); /* note: can't use iovlen until iovcnt is validated */ iovlen = SCARG(uap, iovcnt) * sizeof (struct iovec); if (SCARG(uap, iovcnt) > UIO_SMALLIOV) { diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 2ccc5dfe900..0eedda1429f 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.21 1998/02/14 10:55:09 deraadt Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.22 1998/07/28 00:13:07 millert Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -341,7 +341,8 @@ sosend(so, addr, uio, top, control, flags) struct proc *p = curproc; /* XXX */ struct mbuf **mp; register struct mbuf *m; - register long space, len, resid; + register long space, len; + register quad_t resid; int clen = 0, error, s, dontroute, mlen; int atomic = sosendallatonce(so) || top; @@ -350,7 +351,7 @@ sosend(so, addr, uio, top, control, flags) else resid = top->m_pkthdr.len; /* - * In theory resid should be unsigned. + * In theory resid should be unsigned (since uio->uio_resid is). * However, space must be signed, as it might be less than 0 * if we over-committed, and we must use a signed comparison * of space and resid. On the other hand, a negative resid @@ -523,7 +524,7 @@ soreceive(so, paddr, uio, mp0, controlp, flagsp) struct protosw *pr = so->so_proto; struct mbuf *nextrecord; int moff, type = 0; - int orig_resid = uio->uio_resid; + size_t orig_resid = uio->uio_resid; mp = mp0; if (paddr) diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 65290c40d67..e2b73cb0e66 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_syscalls.c,v 1.7 1998/02/08 22:41:36 tholo Exp $ */ +/* $OpenBSD: uipc_syscalls.c,v 1.8 1998/07/28 00:12:56 millert Exp $ */ /* $NetBSD: uipc_syscalls.c,v 1.19 1996/02/09 19:00:48 christos Exp $ */ /* @@ -385,6 +385,8 @@ sys_sendmsg(p, v, retval) error = copyin(SCARG(uap, msg), (caddr_t)&msg, sizeof (msg)); if (error) return (error); + if (msg.msg_iovlen <= 0) + return (EINVAL); if ((u_int)msg.msg_iovlen >= UIO_SMALLIOV) { if ((u_int)msg.msg_iovlen >= UIO_MAXIOV) return (EMSGSIZE); @@ -568,6 +570,8 @@ sys_recvmsg(p, v, retval) sizeof (msg)); if (error) return (error); + if (msg.msg_iovlen <= 0) + return (EINVAL); if ((u_int)msg.msg_iovlen >= UIO_SMALLIOV) { if ((u_int)msg.msg_iovlen >= UIO_MAXIOV) return (EMSGSIZE); diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index d5152e7facc..f900d77fc24 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_vnops.c,v 1.15 1998/01/15 01:24:40 csapuntz Exp $ */ +/* $OpenBSD: vfs_vnops.c,v 1.16 1998/07/28 00:13:04 millert Exp $ */ /* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */ /* @@ -228,7 +228,7 @@ vn_rdwr(rw, vp, base, len, offset, segflg, ioflg, cred, aresid, p) enum uio_seg segflg; int ioflg; struct ucred *cred; - int *aresid; + size_t *aresid; struct proc *p; { struct uio auio; @@ -271,7 +271,8 @@ vn_read(fp, uio, cred) struct ucred *cred; { register struct vnode *vp = (struct vnode *)fp->f_data; - int count, error = 0; + int error = 0; + size_t count; struct proc *p = uio->uio_procp; VOP_LEASE(vp, uio->uio_procp, cred, LEASE_READ); @@ -297,7 +298,8 @@ vn_write(fp, uio, cred) { register struct vnode *vp = (struct vnode *)fp->f_data; struct proc *p = uio->uio_procp; - int count, error, ioflag = IO_UNIT; + int error, ioflag = IO_UNIT; + size_t count; if (vp->v_type == VREG && (fp->f_flag & O_APPEND)) ioflag |= IO_APPEND; diff --git a/sys/sys/uio.h b/sys/sys/uio.h index 57a25f42438..fa82595f112 100644 --- a/sys/sys/uio.h +++ b/sys/sys/uio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uio.h,v 1.4 1998/05/11 08:00:46 deraadt Exp $ */ +/* $OpenBSD: uio.h,v 1.5 1998/07/28 00:13:12 millert Exp $ */ /* $NetBSD: uio.h,v 1.12 1996/02/09 18:25:45 christos Exp $ */ /* @@ -57,7 +57,7 @@ struct uio { struct iovec *uio_iov; int uio_iovcnt; off_t uio_offset; - int uio_resid; + size_t uio_resid; enum uio_seg uio_segflg; enum uio_rw uio_rw; struct proc *uio_procp; diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 53a93fc9063..6ab48aa7579 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vnode.h,v 1.14 1998/03/14 19:33:03 millert Exp $ */ +/* $OpenBSD: vnode.h,v 1.15 1998/07/28 00:13:10 millert Exp $ */ /* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */ /* @@ -469,7 +469,7 @@ int vrecycle __P((struct vnode *vp, struct simplelock *inter_lkp, struct proc *p)); int vn_rdwr __P((enum uio_rw rw, struct vnode *vp, caddr_t base, int len, off_t offset, enum uio_seg segflg, int ioflg, - struct ucred *cred, int *aresid, struct proc *p)); + struct ucred *cred, size_t *aresid, struct proc *p)); int vn_lock __P((struct vnode *vp, int flags, struct proc *p)); int vop_noislocked __P((void *)); int vop_nolock __P((void *)); diff --git a/sys/ufs/ext2fs/ext2fs_lookup.c b/sys/ufs/ext2fs/ext2fs_lookup.c index c19c1b81dd3..68f39342885 100644 --- a/sys/ufs/ext2fs/ext2fs_lookup.c +++ b/sys/ufs/ext2fs/ext2fs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_lookup.c,v 1.4 1998/01/12 00:45:06 csapuntz Exp $ */ +/* $OpenBSD: ext2fs_lookup.c,v 1.5 1998/07/28 00:13:14 millert Exp $ */ /* $NetBSD: ext2fs_lookup.c,v 1.1 1997/06/11 09:33:59 bouyer Exp $ */ /* @@ -992,7 +992,8 @@ ext2fs_dirempty(ip, parentino, cred) register off_t off; struct ext2fs_dirtemplate dbuf; register struct ext2fs_direct *dp = (struct ext2fs_direct *)&dbuf; - int error, count, namlen; + int error, namlen; + size_t count; #define MINDIRSIZ (sizeof (struct ext2fs_dirtemplate) / 2) @@ -1062,7 +1063,7 @@ ext2fs_checkpath(source, target, cred) } error = vn_rdwr(UIO_READ, vp, (caddr_t)&dirbuf, sizeof (struct ext2fs_dirtemplate), (off_t)0, UIO_SYSSPACE, - IO_NODELOCKED, cred, (int *)0, (struct proc *)0); + IO_NODELOCKED, cred, NULL, (struct proc *)0); if (error != 0) break; namlen = dirbuf.dotdot_namlen; diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c index 8a3d6c0d72f..7a8755fb7a9 100644 --- a/sys/ufs/ext2fs/ext2fs_vnops.c +++ b/sys/ufs/ext2fs/ext2fs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_vnops.c,v 1.6 1997/11/06 05:59:16 csapuntz Exp $ */ +/* $OpenBSD: ext2fs_vnops.c,v 1.7 1998/07/28 00:13:15 millert Exp $ */ /* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */ /* @@ -890,7 +890,7 @@ abortit: error = vn_rdwr(UIO_READ, fvp, (caddr_t)&dirbuf, sizeof (struct ext2fs_dirtemplate), (off_t)0, UIO_SYSSPACE, IO_NODELOCKED, - tcnp->cn_cred, (int *)0, (struct proc *)0); + tcnp->cn_cred, NULL, (struct proc *)0); if (error == 0) { namlen = dirbuf.dotdot_namlen; if (namlen != 2 || @@ -905,7 +905,7 @@ abortit: sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE, IO_NODELOCKED|IO_SYNC, - tcnp->cn_cred, (int *)0, + tcnp->cn_cred, NULL, (struct proc *)0); cache_purge(fdvp); } @@ -1019,7 +1019,7 @@ ext2fs_mkdir(v) dirtemplate.dotdot_reclen = VTOI(dvp)->i_e2fs->e2fs_bsize - 12; error = vn_rdwr(UIO_WRITE, tvp, (caddr_t)&dirtemplate, sizeof (dirtemplate), (off_t)0, UIO_SYSSPACE, - IO_NODELOCKED|IO_SYNC, cnp->cn_cred, (int *)0, (struct proc *)0); + IO_NODELOCKED|IO_SYNC, cnp->cn_cred, NULL, (struct proc *)0); if (error) { dp->i_e2fs_nlink--; dp->i_flag |= IN_CHANGE; @@ -1168,7 +1168,7 @@ ext2fs_symlink(v) ip->i_flag |= IN_CHANGE | IN_UPDATE; } else error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0, - UIO_SYSSPACE, IO_NODELOCKED, ap->a_cnp->cn_cred, (int *)0, + UIO_SYSSPACE, IO_NODELOCKED, ap->a_cnp->cn_cred, NULL, (struct proc *)0); vput(vp); return (error); diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index 4fbea26ed9d..d65df288de1 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_lookup.c,v 1.10 1997/12/11 04:25:45 csapuntz Exp $ */ +/* $OpenBSD: ufs_lookup.c,v 1.11 1998/07/28 00:13:17 millert Exp $ */ /* $NetBSD: ufs_lookup.c,v 1.7 1996/02/09 22:36:06 christos Exp $ */ /* @@ -1026,7 +1026,8 @@ ufs_dirempty(ip, parentino, cred) off_t off, m; struct dirtemplate dbuf; struct direct *dp = (struct direct *)&dbuf; - int error, count, namlen; + int error, namlen; + size_t count; #define MINDIRSIZ (sizeof (struct dirtemplate) / 2) m = ip->i_ffs_size; @@ -1103,7 +1104,7 @@ ufs_checkpath(source, target, cred) } error = vn_rdwr(UIO_READ, vp, (caddr_t)&dirbuf, sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE, - IO_NODELOCKED, cred, (int *)0, (struct proc *)0); + IO_NODELOCKED, cred, NULL, (struct proc *)0); if (error != 0) break; # if (BYTE_ORDER == LITTLE_ENDIAN) diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index d7c65524ce4..b2a9db37120 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ufs_vnops.c,v 1.18 1997/12/11 04:25:46 csapuntz Exp $ */ +/* $OpenBSD: ufs_vnops.c,v 1.19 1998/07/28 00:13:18 millert Exp $ */ /* $NetBSD: ufs_vnops.c,v 1.18 1996/05/11 18:28:04 mycroft Exp $ */ /* @@ -1463,7 +1463,7 @@ ufs_symlink(v) ip->i_flag |= IN_CHANGE | IN_UPDATE; } else error = vn_rdwr(UIO_WRITE, vp, ap->a_target, len, (off_t)0, - UIO_SYSSPACE, IO_NODELOCKED, ap->a_cnp->cn_cred, (int *)0, + UIO_SYSSPACE, IO_NODELOCKED, ap->a_cnp->cn_cred, NULL, (struct proc *)0); vput(vp); return (error); diff --git a/sys/vm/vm_unix.c b/sys/vm/vm_unix.c index 3203d8e7a23..6a1a7a21148 100644 --- a/sys/vm/vm_unix.c +++ b/sys/vm/vm_unix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_unix.c,v 1.8 1997/11/06 05:59:39 csapuntz Exp $ */ +/* $OpenBSD: vm_unix.c,v 1.9 1998/07/28 00:13:21 millert Exp $ */ /* $NetBSD: vm_unix.c,v 1.19 1996/02/10 00:08:14 christos Exp $ */ /* @@ -234,7 +234,7 @@ vm_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize, offset, UIO_SYSSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *) NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) break; @@ -242,7 +242,7 @@ vm_coredump(p, vp, cred, chdr) error = vn_rdwr(UIO_WRITE, vp, (caddr_t)cseg.c_addr, (int)cseg.c_size, offset, UIO_USERSPACE, - IO_NODELOCKED|IO_UNIT, cred, (int *) NULL, p); + IO_NODELOCKED|IO_UNIT, cred, NULL, p); if (error) break; |