summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2011-06-26 18:26:20 +0000
committered <ed@FreeBSD.org>2011-06-26 18:26:20 +0000
commit4ef034d1ea803fc7e2746f9360ad74f8e6ac77be (patch)
tree6dadaf4b44c7fc8c9b8f9f4d96f553859ca7411d /sys/kern
parent59c238c6bed4c3688cd951c136e0cd48bc67c028 (diff)
downloadFreeBSD-src-4ef034d1ea803fc7e2746f9360ad74f8e6ac77be.zip
FreeBSD-src-4ef034d1ea803fc7e2746f9360ad74f8e6ac77be.tar.gz
Fix whitespace inconsistencies in the TTY layer and its drivers owned by me.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/tty.c24
-rw-r--r--sys/kern/tty_inq.c8
-rw-r--r--sys/kern/tty_outq.c2
-rw-r--r--sys/kern/tty_pts.c6
-rw-r--r--sys/kern/tty_ttydisc.c20
5 files changed, 30 insertions, 30 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 8aa3af2..f6475cb 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -470,10 +470,10 @@ ttydev_write(struct cdev *dev, struct uio *uio, int ioflag)
if (error)
goto done;
}
-
- tp->t_flags |= TF_BUSY_OUT;
+
+ tp->t_flags |= TF_BUSY_OUT;
error = ttydisc_write(tp, uio, ioflag);
- tp->t_flags &= ~TF_BUSY_OUT;
+ tp->t_flags &= ~TF_BUSY_OUT;
cv_signal(&tp->t_outserwait);
}
@@ -1054,7 +1054,7 @@ tty_rel_pgrp(struct tty *tp, struct pgrp *pg)
if (tp->t_pgrp == pg)
tp->t_pgrp = NULL;
-
+
tty_unlock(tp);
}
@@ -1241,7 +1241,7 @@ tty_signal_sessleader(struct tty *tp, int sig)
/* Make signals start output again. */
tp->t_flags &= ~TF_STOPPED;
-
+
if (tp->t_session != NULL && tp->t_session->s_leader != NULL) {
p = tp->t_session->s_leader;
PROC_LOCK(p);
@@ -1305,7 +1305,7 @@ tty_wait(struct tty *tp, struct cv *cv)
/* Restart the system call when we may have been revoked. */
if (tp->t_revokecnt != revokecnt)
return (ERESTART);
-
+
/* Bail out when the device slipped away. */
if (tty_gone(tp))
return (ENXIO);
@@ -1327,7 +1327,7 @@ tty_timedwait(struct tty *tp, struct cv *cv, int hz)
/* Restart the system call when we may have been revoked. */
if (tp->t_revokecnt != revokecnt)
return (ERESTART);
-
+
/* Bail out when the device slipped away. */
if (tty_gone(tp))
return (ENXIO);
@@ -1469,7 +1469,7 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, int fflag,
return (error);
/* XXX: CLOCAL? */
-
+
tp->t_termios.c_cflag = t->c_cflag & ~CIGNORE;
tp->t_termios.c_ispeed = t->c_ispeed;
tp->t_termios.c_ospeed = t->c_ospeed;
@@ -1708,7 +1708,7 @@ tty_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, struct thread *td)
if (tty_gone(tp))
return (ENXIO);
-
+
error = ttydevsw_ioctl(tp, cmd, data, td);
if (error == ENOIOCTL)
error = tty_generic_ioctl(tp, cmd, data, fflag, td);
@@ -1786,7 +1786,7 @@ ttyhook_defrint(struct tty *tp, char c, int flags)
if (ttyhook_rint_bypass(tp, &c, 1) != 1)
return (-1);
-
+
return (0);
}
@@ -1812,7 +1812,7 @@ ttyhook_register(struct tty **rtp, struct proc *p, int fd,
error = EBADF;
goto done1;
}
-
+
/*
* Make sure the vnode is bound to a character device.
* Unlocked check for the vnode type is ok there, because we
@@ -1910,7 +1910,7 @@ ttyconsdev_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
/* System console has no TTY associated. */
if (dev_console->si_drv1 == NULL)
return (ENXIO);
-
+
return (ttydev_open(dev, oflags, devtype, td));
}
diff --git a/sys/kern/tty_inq.c b/sys/kern/tty_inq.c
index b0e9b18..0c39a29 100644
--- a/sys/kern/tty_inq.c
+++ b/sys/kern/tty_inq.c
@@ -142,7 +142,7 @@ void
ttyinq_free(struct ttyinq *ti)
{
struct ttyinq_block *tib;
-
+
ttyinq_flush(ti);
ti->ti_quota = 0;
@@ -276,7 +276,7 @@ ttyinq_write(struct ttyinq *ti, const void *buf, size_t nbytes, int quote)
struct ttyinq_block *tib;
unsigned int boff;
size_t l;
-
+
while (nbytes > 0) {
boff = ti->ti_end % TTYINQ_DATASIZE;
@@ -313,7 +313,7 @@ ttyinq_write(struct ttyinq *ti, const void *buf, size_t nbytes, int quote)
nbytes -= l;
ti->ti_end += l;
}
-
+
return (cbuf - (const char *)buf);
}
@@ -397,7 +397,7 @@ ttyinq_peekchar(struct ttyinq *ti, char *c, int *quote)
*c = tib->tib_data[boff];
*quote = GETBIT(tib, boff);
-
+
return (0);
}
diff --git a/sys/kern/tty_outq.c b/sys/kern/tty_outq.c
index d5ed221..5d40abe 100644
--- a/sys/kern/tty_outq.c
+++ b/sys/kern/tty_outq.c
@@ -119,7 +119,7 @@ void
ttyoutq_free(struct ttyoutq *to)
{
struct ttyoutq_block *tob;
-
+
ttyoutq_flush(to);
to->to_quota = 0;
diff --git a/sys/kern/tty_pts.c b/sys/kern/tty_pts.c
index d89c183..a3db59b 100644
--- a/sys/kern/tty_pts.c
+++ b/sys/kern/tty_pts.c
@@ -295,7 +295,7 @@ ptsdev_ioctl(struct file *fp, u_long cmd, void *data,
return (EINVAL);
return copyout(p, fgn->buf, i);
}
-
+
/*
* We need to implement TIOCGPGRP and TIOCGSID here again. When
* called on the pseudo-terminal master, it should not check if
@@ -563,7 +563,7 @@ ptsdev_stat(struct file *fp, struct stat *sb, struct ucred *active_cred,
sb->st_uid = dev->si_uid;
sb->st_gid = dev->si_gid;
sb->st_mode = dev->si_mode | S_IFCHR;
-
+
return (0);
}
@@ -823,7 +823,7 @@ posix_openpt(struct thread *td, struct posix_openpt_args *uap)
*/
if (uap->flags & ~(O_RDWR|O_NOCTTY))
return (EINVAL);
-
+
error = falloc(td, &fp, &fd, 0);
if (error)
return (error);
diff --git a/sys/kern/tty_ttydisc.c b/sys/kern/tty_ttydisc.c
index 6afac8d..2a0bb4b 100644
--- a/sys/kern/tty_ttydisc.c
+++ b/sys/kern/tty_ttydisc.c
@@ -270,13 +270,13 @@ ttydisc_read_raw_interbyte_timer(struct tty *tp, struct uio *uio, int ioflag)
MPASS(tp->t_termios.c_cc[VMIN] != 0);
MPASS(tp->t_termios.c_cc[VTIME] != 0);
-
+
/*
* When using the interbyte timer, the timer should be started
* after the first byte has been received. We just call into the
* generic read timer code after we've received the first byte.
*/
-
+
for (;;) {
error = ttyinq_read_uio(&tp->t_inq, tp, uio,
uio->uio_resid, 0);
@@ -331,7 +331,7 @@ ttydisc_read(struct tty *tp, struct uio *uio, int ioflag)
/* Unset the input watermark when we've got enough space. */
tty_hiwat_in_unblock(tp);
}
-
+
return (error);
}
@@ -521,7 +521,7 @@ ttydisc_write(struct tty *tp, struct uio *uio, int ioflag)
error = EWOULDBLOCK;
goto done;
}
-
+
/*
* The driver may write back the data
* synchronously. Be sure to check the high
@@ -567,7 +567,7 @@ ttydisc_optimize(struct tty *tp)
} else if (!CMP_FLAG(i, ICRNL|IGNCR|IMAXBEL|INLCR|ISTRIP|IXON) &&
(!CMP_FLAG(i, BRKINT) || CMP_FLAG(i, IGNBRK)) &&
(!CMP_FLAG(i, PARMRK) ||
- CMP_FLAG(i, IGNPAR|IGNBRK) == (IGNPAR|IGNBRK)) &&
+ CMP_FLAG(i, IGNPAR|IGNBRK) == (IGNPAR|IGNBRK)) &&
!CMP_FLAG(l, ECHO|ICANON|IEXTEN|ISIG|PENDIN)) {
tp->t_flags |= TF_BYPASS;
} else {
@@ -583,7 +583,7 @@ ttydisc_modem(struct tty *tp, int open)
if (open)
cv_broadcast(&tp->t_dcdwait);
-
+
/*
* Ignore modem status lines when CLOCAL is turned on, but don't
* enter the zombie state when the TTY isn't opened, because
@@ -834,7 +834,7 @@ ttydisc_rint(struct tty *tp, char c, int flags)
if (ttyhook_hashook(tp, rint))
return ttyhook_rint(tp, c, flags);
-
+
if (tp->t_flags & TF_BYPASS)
goto processed;
@@ -1072,7 +1072,7 @@ ttydisc_rint_bypass(struct tty *tp, const void *buf, size_t len)
size_t ret;
tty_lock_assert(tp, MA_OWNED);
-
+
MPASS(tp->t_flags & TF_BYPASS);
atomic_add_long(&tty_nin, len);
@@ -1122,7 +1122,7 @@ ttydisc_rint_poll(struct tty *tp)
l = ttyinq_bytesleft(&tp->t_inq);
if (l == 0 && (tp->t_flags & TF_HIWAT_IN) == 0)
return (1);
-
+
return (l);
}
@@ -1201,7 +1201,7 @@ ttydisc_getc_uio(struct tty *tp, struct uio *uio)
tty_unlock(tp);
error = uiomove(buf, len, uio);
tty_lock(tp);
-
+
if (error != 0)
break;
}
OpenPOWER on IntegriCloud