diff options
author | des <des@FreeBSD.org> | 2001-12-04 01:35:06 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2001-12-04 01:35:06 +0000 |
commit | e05a1e171262ce51abe71929ef3e9a1ae6f484b4 (patch) | |
tree | 07f1c8ada3010a162b86de0898b3c815f2d89562 /sys/fs/procfs/procfs_dbregs.c | |
parent | ff81a8c93d59929b948835d3b2ea7b294d3d55ea (diff) | |
download | FreeBSD-src-e05a1e171262ce51abe71929ef3e9a1ae6f484b4.zip FreeBSD-src-e05a1e171262ce51abe71929ef3e9a1ae6f484b4.tar.gz |
Pseudofsize procfs(5).
Diffstat (limited to 'sys/fs/procfs/procfs_dbregs.c')
-rw-r--r-- | sys/fs/procfs/procfs_dbregs.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/sys/fs/procfs/procfs_dbregs.c b/sys/fs/procfs/procfs_dbregs.c index dad4025..8977955 100644 --- a/sys/fs/procfs/procfs_dbregs.c +++ b/sys/fs/procfs/procfs_dbregs.c @@ -49,27 +49,22 @@ #include <sys/mutex.h> #include <sys/proc.h> #include <sys/ptrace.h> -#include <sys/vnode.h> +#include <sys/uio.h> #include <machine/reg.h> +#include <fs/pseudofs/pseudofs.h> #include <fs/procfs/procfs.h> -#include <vm/vm.h> - int -procfs_dodbregs(curp, p, pfs, uio) - struct proc *curp; - struct proc *p; - struct pfsnode *pfs; - struct uio *uio; +procfs_doprocdbregs(PFS_FILL_ARGS) { int error; struct dbreg r; char *kv; int kl; - if (p_candebug(curp, p)) + if (p_candebug(td->td_proc, p) != 0) return (EPERM); kl = sizeof(r); kv = (char *) &r; @@ -79,8 +74,6 @@ procfs_dodbregs(curp, p, pfs, uio) if (kl > uio->uio_resid) kl = uio->uio_resid; - PHOLD(p); - if (kl < 0) error = EINVAL; else @@ -93,15 +86,7 @@ procfs_dodbregs(curp, p, pfs, uio) else error = proc_write_dbregs(&p->p_thread, &r); /* XXXKSE */ } - PRELE(p); uio->uio_offset = 0; return (error); } - -int -procfs_validdbregs(struct thread *td) -{ - - return ((td->td_proc->p_flag & P_SYSTEM) == 0); -} |