Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/filemon/filemon_wrapper.c
Show First 20 Lines • Show All 179 Lines • ▼ Show 20 Lines | if (filemon->fname1[0] != '/' && fd != AT_FDCWD) { | ||||
filemon_output_event(filemon, "A %d %s\n", | filemon_output_event(filemon, "A %d %s\n", | ||||
curproc->p_pid, filemon->fname1); | curproc->p_pid, filemon->fname1); | ||||
/* | /* | ||||
* Try to resolve the path from the vnode using the | * Try to resolve the path from the vnode using the | ||||
* namecache. It may be inaccurate, but better | * namecache. It may be inaccurate, but better | ||||
* than nothing. | * than nothing. | ||||
*/ | */ | ||||
if (getvnode(td, fd, | if (getvnode(td, fd, | ||||
cap_rights_init(&rights, CAP_LOOKUP), &fp) == 0) { | cap_rights_init_one(&rights, CAP_LOOKUP), &fp) == 0) { | ||||
vn_fullpath(fp->f_vnode, &atpath, &freepath); | vn_fullpath(fp->f_vnode, &atpath, &freepath); | ||||
} | } | ||||
} | } | ||||
if (flags & O_RDWR) { | if (flags & O_RDWR) { | ||||
/* | /* | ||||
* We'll get the W record below, but need | * We'll get the W record below, but need | ||||
* to also output an R to distinguish from | * to also output an R to distinguish from | ||||
* O_WRONLY. | * O_WRONLY. | ||||
▲ Show 20 Lines • Show All 264 Lines • Show Last 20 Lines |