svn commit: r294953 - head/sys/dev/filemon
Bryan Drewery
bdrewery at FreeBSD.org
Wed Jan 27 21:17:45 UTC 2016
Author: bdrewery
Date: Wed Jan 27 21:17:43 2016
New Revision: 294953
URL: https://svnweb.freebsd.org/changeset/base/294953
Log:
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
Modified:
head/sys/dev/filemon/filemon.c
head/sys/dev/filemon/filemon_wrapper.c
Modified: head/sys/dev/filemon/filemon.c
==============================================================================
--- head/sys/dev/filemon/filemon.c Wed Jan 27 21:14:09 2016 (r294952)
+++ head/sys/dev/filemon/filemon.c Wed Jan 27 21:17:43 2016 (r294953)
@@ -105,6 +105,22 @@ static struct cdev *filemon_dev;
#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)
{
struct filemon *filemon = data;
Modified: head/sys/dev/filemon/filemon_wrapper.c
==============================================================================
--- head/sys/dev/filemon/filemon_wrapper.c Wed Jan 27 21:14:09 2016 (r294952)
+++ head/sys/dev/filemon/filemon_wrapper.c Wed Jan 27 21:17:43 2016 (r294953)
@@ -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)
{
More information about the svn-src-all
mailing list