summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-07-15 20:47:41 +0000
committerphk <phk@FreeBSD.org>2004-07-15 20:47:41 +0000
commitf00200d8a459bcf01e832c89518247e88ce28bf0 (patch)
treecb8932d8c884d3a6cc8f7e0616a4bdfa7fe0e5ee /sys/kern
parent2f3742942cca7902c160ba9f75eae9a92e905e0f (diff)
downloadFreeBSD-src-f00200d8a459bcf01e832c89518247e88ce28bf0.zip
FreeBSD-src-f00200d8a459bcf01e832c89518247e88ce28bf0.tar.gz
Preparation commit for the tty cleanups that will follow in the near
future: rename ttyopen() -> tty_open() and ttyclose() -> tty_close(). We need the ttyopen() and ttyclose() for the new generic cdevsw functions for tty devices in order to have consistent naming.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_clist.c4
-rw-r--r--sys/kern/tty.c8
-rw-r--r--sys/kern/tty_conf.c2
-rw-r--r--sys/kern/tty_pty.c2
-rw-r--r--sys/kern/tty_subr.c4
5 files changed, 10 insertions, 10 deletions
diff --git a/sys/kern/subr_clist.c b/sys/kern/subr_clist.c
index cc4b32a..afa1277 100644
--- a/sys/kern/subr_clist.c
+++ b/sys/kern/subr_clist.c
@@ -81,8 +81,8 @@ clist_init(dummy)
{
/*
* Allocate an initial base set of cblocks as a 'slush'.
- * We allocate non-slush cblocks with each initial ttyopen() and
- * deallocate them with each ttyclose().
+ * We allocate non-slush cblocks with each initial tty_open() and
+ * deallocate them with each tty_close().
* We should adjust the slush allocation. This can't be done in
* the i/o routines because they are sometimes called from
* interrupt handlers when it may be unsafe to call malloc().
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 36fbb36..f0172df 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -230,7 +230,7 @@ SYSCTL_INT(_kern, OID_AUTO, drainwait, CTLFLAG_RW, &drainwait,
* Initial open of tty, or (re)entry to standard tty line discipline.
*/
int
-ttyopen(struct cdev *device, struct tty *tp)
+tty_open(struct cdev *device, struct tty *tp)
{
int s;
@@ -256,12 +256,12 @@ ttyopen(struct cdev *device, struct tty *tp)
* Handle close() on a tty line: flush and set to initial state,
* bumping generation number so that pending read/write calls
* can detect recycling of the tty.
- * XXX our caller should have done `spltty(); l_close(); ttyclose();'
+ * XXX our caller should have done `spltty(); l_close(); tty_close();'
* and l_close() should have flushed, but we repeat the spltty() and
* the flush in case there are buggy callers.
*/
int
-ttyclose(struct tty *tp)
+tty_close(struct tty *tp)
{
int s;
@@ -2761,7 +2761,7 @@ ttyrel(struct tty *tp)
/*
* Allocate a tty struct. Clists in the struct will be allocated by
- * ttyopen().
+ * tty_open().
*/
struct tty *
ttymalloc(struct tty *tp)
diff --git a/sys/kern/tty_conf.c b/sys/kern/tty_conf.c
index 488e383..77a9593 100644
--- a/sys/kern/tty_conf.c
+++ b/sys/kern/tty_conf.c
@@ -73,7 +73,7 @@ static struct linesw nodisc = {
};
static struct linesw termios_disc = {
- .l_open = ttyopen,
+ .l_open = tty_open,
.l_close = ttylclose,
.l_read = ttread,
.l_write = ttwrite,
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index 625189c..13b48be 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -207,7 +207,7 @@ ptsclose(struct cdev *dev, int flag, int mode, struct thread *td)
tp = dev->si_tty;
err = ttyld_close(tp, flag);
- (void) ttyclose(tp);
+ (void) tty_close(tp);
return (err);
}
diff --git a/sys/kern/tty_subr.c b/sys/kern/tty_subr.c
index cc4b32a..afa1277 100644
--- a/sys/kern/tty_subr.c
+++ b/sys/kern/tty_subr.c
@@ -81,8 +81,8 @@ clist_init(dummy)
{
/*
* Allocate an initial base set of cblocks as a 'slush'.
- * We allocate non-slush cblocks with each initial ttyopen() and
- * deallocate them with each ttyclose().
+ * We allocate non-slush cblocks with each initial tty_open() and
+ * deallocate them with each tty_close().
* We should adjust the slush allocation. This can't be done in
* the i/o routines because they are sometimes called from
* interrupt handlers when it may be unsafe to call malloc().
OpenPOWER on IntegriCloud