filemon_comment has nothing to do with wrappers so move it out of filemon_wrapper.c.
It only prints the header from filemon_ioctl. Keep the name though to stay closer to other implementations. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
64c368a488
commit
2b198fe92f
@ -104,6 +104,22 @@ static struct cdev *filemon_dev;
|
||||
#include "filemon_lock.c"
|
||||
#include "filemon_wrapper.c"
|
||||
|
||||
static void
|
||||
filemon_comment(struct filemon *filemon)
|
||||
{
|
||||
int len;
|
||||
struct timeval now;
|
||||
|
||||
getmicrotime(&now);
|
||||
|
||||
len = snprintf(filemon->msgbufr, sizeof(filemon->msgbufr),
|
||||
"# filemon version %d\n# Target pid %d\n# Start %ju.%06ju\nV %d\n",
|
||||
FILEMON_VERSION, curproc->p_pid, (uintmax_t)now.tv_sec,
|
||||
(uintmax_t)now.tv_usec, FILEMON_VERSION);
|
||||
|
||||
filemon_output(filemon, filemon->msgbufr, len);
|
||||
}
|
||||
|
||||
static void
|
||||
filemon_dtr(void *data)
|
||||
{
|
||||
|
@ -109,22 +109,6 @@ filemon_pid_check(struct proc *p)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
filemon_comment(struct filemon *filemon)
|
||||
{
|
||||
int len;
|
||||
struct timeval now;
|
||||
|
||||
getmicrotime(&now);
|
||||
|
||||
len = snprintf(filemon->msgbufr, sizeof(filemon->msgbufr),
|
||||
"# filemon version %d\n# Target pid %d\n# Start %ju.%06ju\nV %d\n",
|
||||
FILEMON_VERSION, curproc->p_pid, (uintmax_t)now.tv_sec,
|
||||
(uintmax_t)now.tv_usec, FILEMON_VERSION);
|
||||
|
||||
filemon_output(filemon, filemon->msgbufr, len);
|
||||
}
|
||||
|
||||
static int
|
||||
filemon_wrapper_chdir(struct thread *td, struct chdir_args *uap)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user