diff options
| author | Bryan Drewery <bdrewery@FreeBSD.org> | 2016-03-09 19:50:35 +0000 |
|---|---|---|
| committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2016-03-09 19:50:35 +0000 |
| commit | 044fd543661749a5718c69d538b44019a7a72b2f (patch) | |
| tree | e26692a438633e56b165e74073b711a477c78778 /sys/dev/filemon | |
| parent | c3d1c73fa974ea8bffba0c22aac1dfbf5c43c815 (diff) | |
Notes
Diffstat (limited to 'sys/dev/filemon')
| -rw-r--r-- | sys/dev/filemon/filemon.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/filemon/filemon.c b/sys/dev/filemon/filemon.c index 9ece66daa57f..cd40c5a2e329 100644 --- a/sys/dev/filemon/filemon.c +++ b/sys/dev/filemon/filemon.c @@ -163,8 +163,10 @@ filemon_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag __unused, switch (cmd) { /* Set the output file descriptor. */ case FILEMON_SET_FD: - if (filemon->fp != NULL) - fdrop(filemon->fp, td); + if (filemon->fp != NULL) { + error = EEXIST; + break; + } error = fget_write(td, *(int *)data, cap_rights_init(&rights, CAP_PWRITE), |
