Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/filemon/filemon_wrapper.c
Show First 20 Lines • Show All 143 Lines • ▼ Show 20 Lines | if ((filemon = filemon_proc_get(p)) != NULL) { | ||||
} | } | ||||
filemon_drop(filemon); | filemon_drop(filemon); | ||||
} | } | ||||
} | } | ||||
static void | static void | ||||
_filemon_wrapper_openat(struct thread *td, char *upath, int flags, int fd) | _filemon_wrapper_openat(struct thread *td, const char *upath, int flags, | ||||
int fd) | |||||
{ | { | ||||
int error; | int error; | ||||
struct file *fp; | struct file *fp; | ||||
struct filemon *filemon; | struct filemon *filemon; | ||||
char *atpath, *freepath; | char *atpath, *freepath; | ||||
cap_rights_t rights; | cap_rights_t rights; | ||||
if ((filemon = filemon_proc_get(curproc)) != NULL) { | if ((filemon = filemon_proc_get(curproc)) != NULL) { | ||||
▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | copyfail: | ||||
filemon_drop(filemon); | filemon_drop(filemon); | ||||
} | } | ||||
} | } | ||||
return (ret); | return (ret); | ||||
} | } | ||||
static void | static void | ||||
_filemon_wrapper_link(struct thread *td, char *upath1, char *upath2) | _filemon_wrapper_link(struct thread *td, const char *upath1, | ||||
const char *upath2) | |||||
{ | { | ||||
struct filemon *filemon; | struct filemon *filemon; | ||||
int error; | int error; | ||||
if ((filemon = filemon_proc_get(curproc)) != NULL) { | if ((filemon = filemon_proc_get(curproc)) != NULL) { | ||||
if (((error = copyinstr(upath1, filemon->fname1, | if (((error = copyinstr(upath1, filemon->fname1, | ||||
sizeof(filemon->fname1), NULL)) != 0) || | sizeof(filemon->fname1), NULL)) != 0) || | ||||
((error = copyinstr(upath2, filemon->fname2, | ((error = copyinstr(upath2, filemon->fname2, | ||||
▲ Show 20 Lines • Show All 187 Lines • Show Last 20 Lines |