Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys There's no need to pass a proc value when using UIO_SYSS...
details: https://anonhg.NetBSD.org/src/rev/371c1d2492ab
branches: trunk
changeset: 570004:371c1d2492ab
user: skrll <skrll%NetBSD.org@localhost>
date: Fri Sep 17 14:11:20 2004 +0000
description:
There's no need to pass a proc value when using UIO_SYSSPACE with
vn_rdwr(9) and uiomove(9).
OK'd by Jason Thorpe
diffstat:
sys/arch/alpha/alpha/vm_machdep.c | 9 ++++-----
sys/arch/amd64/amd64/autoconf.c | 6 +++---
sys/arch/amd64/amd64/netbsd32_machdep.c | 9 ++++-----
sys/arch/amd64/amd64/vm_machdep.c | 9 ++++-----
sys/arch/arm/arm/vm_machdep_arm.c | 9 ++++-----
sys/arch/hppa/hppa/vm_machdep.c | 7 +++----
sys/arch/i386/i386/autoconf.c | 6 +++---
sys/arch/i386/i386/vm_machdep.c | 9 ++++-----
sys/arch/m68k/m68k/vm_machdep.c | 9 ++++-----
sys/arch/mips/mips/cpu_exec.c | 6 +++---
sys/arch/mips/mips/vm_machdep.c | 9 ++++-----
sys/arch/pc532/pc532/vm_machdep.c | 9 ++++-----
sys/arch/powerpc/powerpc/vm_machdep.c | 9 ++++-----
sys/arch/sh3/sh3/coff_exec.c | 10 +++++-----
sys/arch/sh3/sh3/vm_machdep.c | 8 ++++----
sys/arch/sh5/sh5/vm_machdep.c | 8 ++++----
sys/arch/sparc/sparc/vm_machdep.c | 8 ++++----
sys/arch/sparc64/sparc64/netbsd32_machdep.c | 9 ++++-----
sys/arch/sparc64/sparc64/vm_machdep.c | 8 ++++----
sys/arch/vax/vax/vm_machdep.c | 9 ++++-----
sys/arch/xen/i386/autoconf.c | 6 +++---
sys/coda/coda_vfsops.c | 6 +++---
sys/compat/darwin/darwin_iohidsystem.c | 6 +++---
sys/compat/ibcs2/ibcs2_exec_coff.c | 8 ++++----
sys/compat/ibcs2/ibcs2_exec_xout.c | 6 +++---
sys/compat/ibcs2/ibcs2_misc.c | 8 ++++----
sys/compat/irix/irix_dirent.c | 8 ++++----
sys/compat/linux/common/linux_file64.c | 6 +++---
sys/compat/linux/common/linux_misc.c | 6 +++---
sys/compat/linux/common/linux_uselib.c | 6 +++---
sys/compat/netbsd32/netbsd32_core.c | 8 ++++----
sys/compat/osf1/osf1_exec_ecoff.c | 6 +++---
sys/compat/sunos/sunos_misc.c | 6 +++---
sys/compat/sunos32/sunos32_misc.c | 6 +++---
sys/compat/svr4/svr4_misc.c | 8 ++++----
sys/compat/svr4_32/svr4_32_misc.c | 8 ++++----
sys/dev/kloader.c | 6 +++---
sys/dev/usb/ubtbcmfw.c | 6 +++---
sys/fs/cd9660/cd9660_vnops.c | 6 +++---
sys/fs/smbfs/smbfs_io.c | 6 +++---
sys/fs/union/union_subr.c | 6 +++---
sys/kern/core_elf32.c | 16 ++++++++--------
sys/kern/core_netbsd.c | 8 ++++----
sys/kern/exec_subr.c | 6 +++---
sys/kern/kern_acct.c | 6 +++---
sys/kern/kern_exec.c | 6 +++---
sys/kern/kern_verifiedexec.c | 8 ++++----
sys/kern/sys_process.c | 6 +++---
sys/kern/vfs_getcwd.c | 6 +++---
sys/kern/vfs_lookup.c | 6 +++---
sys/miscfs/genfs/genfs_vnops.c | 8 ++++----
sys/miscfs/portal/portal_vnops.c | 6 +++---
sys/netccitt/pk_acct.c | 6 +++---
sys/netsmb/smb_trantcp.c | 6 +++---
sys/nfs/nfs_bio.c | 6 +++---
sys/nfs/nfs_serv.c | 16 ++++++++--------
sys/nfs/nfs_socket.c | 6 +++---
sys/nfs/nfs_subs.c | 8 ++++----
sys/opencrypto/cryptodev.c | 6 +++---
sys/ufs/ext2fs/ext2fs_lookup.c | 10 +++++-----
sys/ufs/ext2fs/ext2fs_vnops.c | 12 ++++++------
sys/ufs/ffs/ffs_snapshot.c | 10 +++++-----
sys/ufs/ufs/ufs_lookup.c | 8 ++++----
sys/ufs/ufs/ufs_quota.c | 8 ++++----
sys/ufs/ufs/ufs_vnops.c | 6 +++---
65 files changed, 241 insertions(+), 253 deletions(-)
diffs (truncated from 2236 to 300 lines):
diff -r b426c6de731c -r 371c1d2492ab sys/arch/alpha/alpha/vm_machdep.c
--- a/sys/arch/alpha/alpha/vm_machdep.c Fri Sep 17 12:18:55 2004 +0000
+++ b/sys/arch/alpha/alpha/vm_machdep.c Fri Sep 17 14:11:20 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.83 2004/08/28 22:12:40 thorpej Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.84 2004/09/17 14:11:20 skrll Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.83 2004/08/28 22:12:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.84 2004/09/17 14:11:20 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -58,7 +58,6 @@
int error;
struct md_coredump cpustate;
struct coreseg cseg;
- struct proc *p = l->l_proc;
CORE_SETMAGIC(*chdr, COREMAGIC, MID_MACHINE, 0);
chdr->c_hdrsize = ALIGN(sizeof(*chdr));
@@ -80,13 +79,13 @@
error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize,
(off_t)chdr->c_hdrsize, UIO_SYSSPACE,
- IO_NODELOCKED|IO_UNIT, cred, NULL, p);
+ IO_NODELOCKED|IO_UNIT, cred, NULL, NULL);
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, NULL, p);
+ IO_NODELOCKED|IO_UNIT, cred, NULL, NULL);
if (!error)
chdr->c_nseg++;
diff -r b426c6de731c -r 371c1d2492ab sys/arch/amd64/amd64/autoconf.c
--- a/sys/arch/amd64/amd64/autoconf.c Fri Sep 17 12:18:55 2004 +0000
+++ b/sys/arch/amd64/amd64/autoconf.c Fri Sep 17 14:11:20 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.7 2003/12/30 12:33:15 pk Exp $ */
+/* $NetBSD: autoconf.c,v 1.8 2004/09/17 14:11:21 skrll Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.7 2003/12/30 12:33:15 pk Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.8 2004/09/17 14:11:21 skrll Exp $");
#include "opt_multiprocessor.h"
@@ -219,7 +219,7 @@
continue;
}
error = vn_rdwr(UIO_READ, tv, mbr, DEV_BSIZE, 0,
- UIO_SYSSPACE, 0, NOCRED, NULL, 0);
+ UIO_SYSSPACE, 0, NOCRED, NULL, NULL);
VOP_CLOSE(tv, FREAD, NOCRED, 0);
if (error) {
#ifdef GEOM_DEBUG
diff -r b426c6de731c -r 371c1d2492ab sys/arch/amd64/amd64/netbsd32_machdep.c
--- a/sys/arch/amd64/amd64/netbsd32_machdep.c Fri Sep 17 12:18:55 2004 +0000
+++ b/sys/arch/amd64/amd64/netbsd32_machdep.c Fri Sep 17 14:11:20 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_machdep.c,v 1.10 2004/03/25 15:32:27 drochner Exp $ */
+/* $NetBSD: netbsd32_machdep.c,v 1.11 2004/09/17 14:11:21 skrll Exp $ */
/*
* Copyright (c) 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.10 2004/03/25 15:32:27 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.11 2004/09/17 14:11:21 skrll Exp $");
#include "opt_compat_netbsd.h"
#include "opt_execfmt.h"
@@ -420,7 +420,6 @@
cpu_coredump32(struct lwp *l, struct vnode *vp, struct ucred *cred,
struct core32 *chdr)
{
- struct proc *p = l->l_proc;
struct md_core32 md_core;
struct coreseg cseg;
int error;
@@ -446,13 +445,13 @@
error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize,
(off_t)chdr->c_hdrsize, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred,
- NULL, p);
+ NULL, NULL);
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, NULL, p);
+ IO_NODELOCKED|IO_UNIT, cred, NULL, NULL);
if (error)
return error;
diff -r b426c6de731c -r 371c1d2492ab sys/arch/amd64/amd64/vm_machdep.c
--- a/sys/arch/amd64/amd64/vm_machdep.c Fri Sep 17 12:18:55 2004 +0000
+++ b/sys/arch/amd64/amd64/vm_machdep.c Fri Sep 17 14:11:20 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.8 2004/08/28 22:12:40 thorpej Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.9 2004/09/17 14:11:21 skrll Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.8 2004/08/28 22:12:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.9 2004/09/17 14:11:21 skrll Exp $");
#include "opt_user_ldt.h"
#include "opt_largepages.h"
@@ -291,7 +291,6 @@
struct ucred *cred;
struct core *chdr;
{
- struct proc *p = l->l_proc;
struct md_core md_core;
struct coreseg cseg;
int error;
@@ -317,13 +316,13 @@
error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize,
(off_t)chdr->c_hdrsize, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred,
- NULL, p);
+ NULL, NULL);
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, NULL, p);
+ IO_NODELOCKED|IO_UNIT, cred, NULL, NULL);
if (error)
return error;
diff -r b426c6de731c -r 371c1d2492ab sys/arch/arm/arm/vm_machdep_arm.c
--- a/sys/arch/arm/arm/vm_machdep_arm.c Fri Sep 17 12:18:55 2004 +0000
+++ b/sys/arch/arm/arm/vm_machdep_arm.c Fri Sep 17 14:11:20 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep_arm.c,v 1.7 2003/06/29 22:28:08 fvdl Exp $ */
+/* $NetBSD: vm_machdep_arm.c,v 1.8 2004/09/17 14:11:21 skrll Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -37,7 +37,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep_arm.c,v 1.7 2003/06/29 22:28:08 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep_arm.c,v 1.8 2004/09/17 14:11:21 skrll Exp $");
#include <sys/core.h>
#include <sys/exec.h>
@@ -58,7 +58,6 @@
cpu_coredump(struct lwp *l, struct vnode *vp, struct ucred *cred,
struct core *chdr)
{
- struct proc *p = l->l_proc;
int error;
struct {
struct reg regs;
@@ -86,13 +85,13 @@
error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize,
(off_t)chdr->c_hdrsize, UIO_SYSSPACE,
- IO_NODELOCKED|IO_UNIT, cred, NULL, p);
+ IO_NODELOCKED|IO_UNIT, cred, NULL, NULL);
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, NULL, p);
+ IO_NODELOCKED|IO_UNIT, cred, NULL, NULL);
if (error)
return error;
diff -r b426c6de731c -r 371c1d2492ab sys/arch/hppa/hppa/vm_machdep.c
--- a/sys/arch/hppa/hppa/vm_machdep.c Fri Sep 17 12:18:55 2004 +0000
+++ b/sys/arch/hppa/hppa/vm_machdep.c Fri Sep 17 14:11:20 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.13 2004/08/28 22:12:40 thorpej Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.14 2004/09/17 14:11:21 skrll Exp $ */
/* $OpenBSD: vm_machdep.c,v 1.25 2001/09/19 20:50:56 mickey Exp $ */
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.13 2004/08/28 22:12:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.14 2004/09/17 14:11:21 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -63,7 +63,6 @@
cpu_coredump(struct lwp *l, struct vnode *vp, struct ucred *cred,
struct core *core)
{
- struct proc *p = l->l_proc;
struct md_coredump md_core;
struct coreseg cseg;
off_t off;
@@ -81,7 +80,7 @@
cseg.c_size = core->c_cpusize;
#define write(vp, addr, n) vn_rdwr(UIO_WRITE, (vp), (caddr_t)(addr), (n), off, \
- UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, NULL, p)
+ UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred, NULL, NULL)
off = core->c_hdrsize;
if ((error = write(vp, &cseg, core->c_seghdrsize)))
diff -r b426c6de731c -r 371c1d2492ab sys/arch/i386/i386/autoconf.c
--- a/sys/arch/i386/i386/autoconf.c Fri Sep 17 12:18:55 2004 +0000
+++ b/sys/arch/i386/i386/autoconf.c Fri Sep 17 14:11:20 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.77 2004/08/05 18:04:35 dbj Exp $ */
+/* $NetBSD: autoconf.c,v 1.78 2004/09/17 14:11:21 skrll Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.77 2004/08/05 18:04:35 dbj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.78 2004/09/17 14:11:21 skrll Exp $");
#include "opt_compat_oldboot.h"
#include "opt_multiprocessor.h"
@@ -254,7 +254,7 @@
continue;
}
error = vn_rdwr(UIO_READ, tv, mbr, DEV_BSIZE, 0,
- UIO_SYSSPACE, 0, NOCRED, NULL, 0);
+ UIO_SYSSPACE, 0, NOCRED, NULL, NULL);
VOP_CLOSE(tv, FREAD, NOCRED, 0);
if (error) {
#ifdef GEOM_DEBUG
diff -r b426c6de731c -r 371c1d2492ab sys/arch/i386/i386/vm_machdep.c
--- a/sys/arch/i386/i386/vm_machdep.c Fri Sep 17 12:18:55 2004 +0000
+++ b/sys/arch/i386/i386/vm_machdep.c Fri Sep 17 14:11:20 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.117 2004/08/28 22:12:40 thorpej Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.118 2004/09/17 14:11:21 skrll Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.117 2004/08/28 22:12:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.118 2004/09/17 14:11:21 skrll Exp $");
#include "opt_user_ldt.h"
#include "opt_largepages.h"
@@ -277,7 +277,6 @@
cpu_coredump(struct lwp *l, struct vnode *vp, struct ucred *cred,
struct core *chdr)
{
- struct proc *p = l->l_proc;
struct md_core md_core;
struct coreseg cseg;
int error;
@@ -303,13 +302,13 @@
error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&cseg, chdr->c_seghdrsize,
(off_t)chdr->c_hdrsize, UIO_SYSSPACE, IO_NODELOCKED|IO_UNIT, cred,
- NULL, p);
+ NULL, NULL);
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, NULL, p);
+ IO_NODELOCKED|IO_UNIT, cred, NULL, NULL);
if (error)
return error;
diff -r b426c6de731c -r 371c1d2492ab sys/arch/m68k/m68k/vm_machdep.c
Home |
Main Index |
Thread Index |
Old Index