summaryrefslogtreecommitdiffstats
path: root/sys/dev/pty/pty.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-08-08 13:18:31 -0300
committerRenato Botelho <renato@netgate.com>2016-08-08 13:18:31 -0300
commitc481775c0ef4d4d98dd1d53711a00b2e101533d2 (patch)
tree9590dc3802a31ee0e5931f40e389abe8e2785b78 /sys/dev/pty/pty.c
parent4008e6a2e9bc1ee9983a4cf7d23093d2015026d6 (diff)
parent89512a096a7717f8c3f2ca6889e0c6b1a1d50b32 (diff)
downloadFreeBSD-src-c481775c0ef4d4d98dd1d53711a00b2e101533d2.zip
FreeBSD-src-c481775c0ef4d4d98dd1d53711a00b2e101533d2.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'sys/dev/pty/pty.c')
-rw-r--r--sys/dev/pty/pty.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/dev/pty/pty.c b/sys/dev/pty/pty.c
index 5036cb2..ad34e11 100644
--- a/sys/dev/pty/pty.c
+++ b/sys/dev/pty/pty.c
@@ -52,10 +52,10 @@ __FBSDID("$FreeBSD$");
* binary emulation.
*/
-static unsigned int pty_warningcnt = 1;
+static unsigned pty_warningcnt = 1;
SYSCTL_UINT(_kern, OID_AUTO, tty_pty_warningcnt, CTLFLAG_RW,
- &pty_warningcnt, 0,
- "Warnings that will be triggered upon legacy PTY allocation");
+ &pty_warningcnt, 0,
+ "Warnings that will be triggered upon legacy PTY allocation");
static int
ptydev_fdopen(struct cdev *dev, int fflags, struct thread *td, struct file *fp)
@@ -77,12 +77,7 @@ ptydev_fdopen(struct cdev *dev, int fflags, struct thread *td, struct file *fp)
}
/* Raise a warning when a legacy PTY has been allocated. */
- if (pty_warningcnt > 0) {
- pty_warningcnt--;
- log(LOG_INFO, "pid %d (%s) is using legacy pty devices%s\n",
- td->td_proc->p_pid, td->td_name,
- pty_warningcnt ? "" : " - not logging anymore");
- }
+ counted_warning(&pty_warningcnt, "is using legacy pty devices");
return (0);
}
OpenPOWER on IntegriCloud