projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use balloc to extend Ifile.
[unix-history]
/
usr
/
src
/
sys
/
kern
/
tty_bk.c
diff --git
a/usr/src/sys/kern/tty_bk.c
b/usr/src/sys/kern/tty_bk.c
index
2f8862f
..
307d6cd
100644
(file)
--- a/
usr/src/sys/kern/tty_bk.c
+++ b/
usr/src/sys/kern/tty_bk.c
@@
-1,19
+1,20
@@
-/* tty_bk.c 4.6 82/10/17 */
+/*
+ * Copyright (c) 1982, 1986 Regents of the University of California.
+ * All rights reserved. The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ * @(#)tty_bk.c 7.3 (Berkeley) %G%
+ */
#include "bk.h"
#if NBK > 0
#include "bk.h"
#if NBK > 0
-#include "../h/param.h"
-#include "../h/systm.h"
-#include "../h/dir.h"
-#include "../h/user.h"
-#include "../h/tty.h"
-#include "../h/proc.h"
-#include "../h/inode.h"
-#include "../h/file.h"
-#include "../h/conf.h"
-#include "../h/buf.h"
-#include "../h/uio.h"
+#include "param.h"
+#include "user.h"
+#include "ioctl.h"
+#include "tty.h"
+#include "file.h"
+#include "buf.h"
/*
* Line discipline for Berkeley network.
/*
* Line discipline for Berkeley network.
@@
-43,7
+44,7
@@
bkopen(dev, tp)
if (tp->t_line == NETLDISC)
return (EBUSY); /* sometimes the network opens /dev/tty */
bp = geteblk(1024);
if (tp->t_line == NETLDISC)
return (EBUSY); /* sometimes the network opens /dev/tty */
bp = geteblk(1024);
-
flushtty
(tp, FREAD|FWRITE);
+
ttyflush
(tp, FREAD|FWRITE);
tp->t_bufp = bp;
tp->t_cp = (char *)bp->b_un.b_addr;
tp->t_inbuf = 0;
tp->t_bufp = bp;
tp->t_cp = (char *)bp->b_un.b_addr;
tp->t_inbuf = 0;
@@
-86,7
+87,7
@@
bkread(tp, uio)
register struct tty *tp;
struct uio *uio;
{
register struct tty *tp;
struct uio *uio;
{
- register int
i,
s;
+ register int s;
int error;
if ((tp->t_state&TS_CARR_ON)==0)
int error;
if ((tp->t_state&TS_CARR_ON)==0)
@@
-97,7
+98,7
@@
bkread(tp, uio)
splx(s);
if (tp->t_line != NETLDISC)
return (-1);
splx(s);
if (tp->t_line != NETLDISC)
return (-1);
- error = uiomove(tp->t_bufp->b_un.b_addr, tp->t_inbuf,
UIO_READ,
uio);
+ error = uiomove(tp->t_bufp->b_un.b_addr, tp->t_inbuf, uio);
tp->t_cp = (char *)tp->t_bufp->b_un.b_addr;
tp->t_inbuf = 0;
tp->t_rec = 0;
tp->t_cp = (char *)tp->t_bufp->b_un.b_addr;
tp->t_inbuf = 0;
tp->t_rec = 0;