Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_proc.c
Show First 20 Lines • Show All 2,147 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
static int | static int | ||||
sysctl_kern_proc_pathname(SYSCTL_HANDLER_ARGS) | sysctl_kern_proc_pathname(SYSCTL_HANDLER_ARGS) | ||||
{ | { | ||||
pid_t *pidp = (pid_t *)arg1; | pid_t *pidp = (pid_t *)arg1; | ||||
unsigned int arglen = arg2; | unsigned int arglen = arg2; | ||||
struct proc *p; | struct proc *p; | ||||
struct vnode *vp; | struct vnode *vp; | ||||
char *retbuf, *freebuf; | char *freebuf; | ||||
const char *retbuf; | |||||
int error; | int error; | ||||
if (arglen != 1) | if (arglen != 1) | ||||
return (EINVAL); | return (EINVAL); | ||||
if (*pidp == -1) { /* -1 means this process */ | if (*pidp == -1) { /* -1 means this process */ | ||||
p = req->td->td_proc; | p = req->td->td_proc; | ||||
} else { | } else { | ||||
error = pget(*pidp, PGET_CANSEE, &p); | error = pget(*pidp, PGET_CANSEE, &p); | ||||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | |||||
#endif | #endif | ||||
#ifdef COMPAT_FREEBSD7 | #ifdef COMPAT_FREEBSD7 | ||||
static int | static int | ||||
sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_ARGS) | sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_ARGS) | ||||
{ | { | ||||
vm_map_entry_t entry, tmp_entry; | vm_map_entry_t entry, tmp_entry; | ||||
unsigned int last_timestamp; | unsigned int last_timestamp; | ||||
char *fullpath, *freepath; | const char *fullpath; | ||||
char *freepath; | |||||
struct kinfo_ovmentry *kve; | struct kinfo_ovmentry *kve; | ||||
struct vattr va; | struct vattr va; | ||||
struct ucred *cred; | struct ucred *cred; | ||||
int error, *name; | int error, *name; | ||||
struct vnode *vp; | struct vnode *vp; | ||||
struct proc *p; | struct proc *p; | ||||
vm_map_t map; | vm_map_t map; | ||||
struct vmspace *vm; | struct vmspace *vm; | ||||
▲ Show 20 Lines • Show All 195 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
int | int | ||||
kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) | kern_proc_vmmap_out(struct proc *p, struct sbuf *sb, ssize_t maxlen, int flags) | ||||
{ | { | ||||
vm_map_entry_t entry, tmp_entry; | vm_map_entry_t entry, tmp_entry; | ||||
struct vattr va; | struct vattr va; | ||||
vm_map_t map; | vm_map_t map; | ||||
vm_object_t obj, tobj, lobj; | vm_object_t obj, tobj, lobj; | ||||
char *fullpath, *freepath; | const char *fullpath; | ||||
char *freepath; | |||||
struct kinfo_vmentry *kve; | struct kinfo_vmentry *kve; | ||||
struct ucred *cred; | struct ucred *cred; | ||||
struct vnode *vp; | struct vnode *vp; | ||||
struct vmspace *vm; | struct vmspace *vm; | ||||
vm_offset_t addr; | vm_offset_t addr; | ||||
unsigned int last_timestamp; | unsigned int last_timestamp; | ||||
int error; | int error; | ||||
bool super; | bool super; | ||||
▲ Show 20 Lines • Show All 852 Lines • Show Last 20 Lines |