diff options
Diffstat (limited to 'sys/fs/procfs/procfs_regs.c')
-rw-r--r-- | sys/fs/procfs/procfs_regs.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/fs/procfs/procfs_regs.c b/sys/fs/procfs/procfs_regs.c index 8b0600a..bc5520c 100644 --- a/sys/fs/procfs/procfs_regs.c +++ b/sys/fs/procfs/procfs_regs.c @@ -36,7 +36,7 @@ * * @(#)procfs_regs.c 8.3 (Berkeley) 1/27/94 * - * $Id: procfs_regs.c,v 1.1.1.1 1994/05/24 10:05:08 rgrimes Exp $ + * $Id: procfs_regs.c,v 1.2 1994/08/02 07:45:18 davidg Exp $ */ #include <sys/param.h> @@ -47,6 +47,8 @@ #include <sys/vnode.h> #include <machine/reg.h> #include <miscfs/procfs/procfs.h> +#include <vm/vm.h> +#include <vm/vm_extern.h> int procfs_doregs(curp, p, pfs, uio) @@ -68,6 +70,8 @@ procfs_doregs(curp, p, pfs, uio) if (kl > uio->uio_resid) kl = uio->uio_resid; + PHOLD(p); + if (kl < 0) error = EINVAL; else @@ -80,7 +84,15 @@ procfs_doregs(curp, p, pfs, uio) else error = procfs_write_regs(p, &r); } + PRELE(p); uio->uio_offset = 0; return (error); } + +int +procfs_validregs(p) + struct proc *p; +{ + return ((p->p_flag & P_SYSTEM) == 0); +} |