svn commit: r242158 - head/sys/dev/filemon
David E. O'Brien
obrien at FreeBSD.org
Fri Oct 26 20:24:13 UTC 2012
Author: obrien
Date: Fri Oct 26 20:24:13 2012
New Revision: 242158
URL: http://svn.freebsd.org/changeset/base/242158
Log:
A little bit easier to read.
Modified:
head/sys/dev/filemon/filemon.c
Modified: head/sys/dev/filemon/filemon.c
==============================================================================
--- head/sys/dev/filemon/filemon.c Fri Oct 26 20:14:40 2012 (r242157)
+++ head/sys/dev/filemon/filemon.c Fri Oct 26 20:24:13 2012 (r242158)
@@ -136,6 +136,12 @@ filemon_dtr(void *data)
}
}
+#if __FreeBSD_version < 900041
+#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), (a3))
+#else
+#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), CAP_WRITE | CAP_SEEK, (a3))
+#endif
+
static int
filemon_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag __unused,
struct thread *td)
@@ -148,11 +154,6 @@ filemon_ioctl(struct cdev *dev, u_long c
switch (cmd) {
/* Set the output file descriptor. */
case FILEMON_SET_FD:
-#if __FreeBSD_version < 900041
-#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), (a3))
-#else
-#define FGET_WRITE(a1, a2, a3) fget_write((a1), (a2), CAP_WRITE | CAP_SEEK, (a3))
-#endif
if ((error = FGET_WRITE(td, *(int *)data, &filemon->fp)) == 0)
/* Write the file header. */
filemon_comment(filemon);
@@ -160,7 +161,7 @@ filemon_ioctl(struct cdev *dev, u_long c
/* Set the monitored process ID. */
case FILEMON_SET_PID:
- filemon->pid = *((pid_t *) data);
+ filemon->pid = *((pid_t *)data);
break;
default:
More information about the svn-src-all
mailing list