procfs_mem.c (84637) | procfs_mem.c (87321) |
---|---|
1/* 2 * Copyright (c) 1993 Jan-Simon Pendry 3 * Copyright (c) 1993 Sean Eric Fagan 4 * Copyright (c) 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Jan-Simon Pendry and Sean Eric Fagan. --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)procfs_mem.c 8.5 (Berkeley) 6/15/94 39 * | 1/* 2 * Copyright (c) 1993 Jan-Simon Pendry 3 * Copyright (c) 1993 Sean Eric Fagan 4 * Copyright (c) 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Jan-Simon Pendry and Sean Eric Fagan. --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)procfs_mem.c 8.5 (Berkeley) 6/15/94 39 * |
40 * $FreeBSD: head/sys/fs/procfs/procfs_mem.c 84637 2001-10-07 20:08:42Z des $ | 40 * $FreeBSD: head/sys/fs/procfs/procfs_mem.c 87321 2001-12-04 01:35:06Z des $ |
41 */ 42 43#include <sys/param.h> | 41 */ 42 43#include <sys/param.h> |
44#include <sys/systm.h> | |
45#include <sys/lock.h> 46#include <sys/mutex.h> 47#include <sys/proc.h> 48#include <sys/ptrace.h> | 44#include <sys/lock.h> 45#include <sys/mutex.h> 46#include <sys/proc.h> 47#include <sys/ptrace.h> |
49#include <sys/user.h> 50#include <sys/vnode.h> | 48#include <sys/uio.h> |
51 | 49 |
50#include <fs/pseudofs/pseudofs.h> |
|
52#include <fs/procfs/procfs.h> 53 54/* 55 * Copy data in and out of the target process. 56 * We do this by mapping the process's page into 57 * the kernel and then doing a uiomove direct 58 * from the kernel address space. 59 */ 60int | 51#include <fs/procfs/procfs.h> 52 53/* 54 * Copy data in and out of the target process. 55 * We do this by mapping the process's page into 56 * the kernel and then doing a uiomove direct 57 * from the kernel address space. 58 */ 59int |
61procfs_domem(curp, p, pfs, uio) 62 struct proc *curp; 63 struct proc *p; 64 struct pfsnode *pfs; 65 struct uio *uio; | 60procfs_doprocmem(PFS_FILL_ARGS) |
66{ 67 int error; 68 69 if (uio->uio_resid == 0) 70 return (0); 71 | 61{ 62 int error; 63 64 if (uio->uio_resid == 0) 65 return (0); 66 |
72 error = p_candebug(curp, p); | 67 error = p_candebug(td->td_proc, p); |
73 if (error) 74 return (error); | 68 if (error) 69 return (error); |
70 error = proc_rwmem(p, uio); |
|
75 | 71 |
76 return (proc_rwmem(p, uio)); | 72 return (error); |
77} | 73} |