diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2009-08-23 08:04:40 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2009-08-23 08:04:40 +0000 |
| commit | 5c67885a2660e6403402851f912dd01331cb45d4 (patch) | |
| tree | 832ce47945c34ffc3c6cc8881a39f32c034bfb8a /sys/dev/snp | |
| parent | 8f26c03fe64c21c8e35ebcb8eff474a0c4b29312 (diff) | |
Notes
Diffstat (limited to 'sys/dev/snp')
| -rw-r--r-- | sys/dev/snp/snp.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c index fcc70a5d84f3..37d996563f94 100644 --- a/sys/dev/snp/snp.c +++ b/sys/dev/snp/snp.c @@ -192,7 +192,7 @@ snp_write(struct cdev *dev, struct uio *uio, int flag) { struct snp_softc *ss; struct tty *tp; - int error, len, i; + int error, len; char in[SNP_INPUT_BUFSIZE]; error = devfs_get_cdevpriv((void **)&ss); @@ -223,14 +223,9 @@ snp_write(struct cdev *dev, struct uio *uio, int flag) * because we shouldn't bail out when we're running * close to the watermarks. */ - if (ttydisc_can_bypass(tp)) { - ttydisc_rint_bypass(tp, in, len); - } else { - for (i = 0; i < len; i++) - ttydisc_rint(tp, in[i], 0); - } - + ttydisc_rint_simple(tp, in, len); ttydisc_rint_done(tp); + tty_unlock(tp); } |
