summaryrefslogtreecommitdiff
path: root/sys/kern/tty_subr.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1995-10-31 19:00:00 +0000
committerPeter Wemm <peter@FreeBSD.org>1995-10-31 19:00:00 +0000
commite8c8f201ecbadbee29c4993bccca227bf7765308 (patch)
tree862e93052eefece7cec0f88ce619d9a3d6345bb8 /sys/kern/tty_subr.c
parentc227cb34569910a3bd8edb1a8cf2683d5431ca2a (diff)
Notes
Diffstat (limited to 'sys/kern/tty_subr.c')
-rw-r--r--sys/kern/tty_subr.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/sys/kern/tty_subr.c b/sys/kern/tty_subr.c
index 734f797cb828..9123397de0d4 100644
--- a/sys/kern/tty_subr.c
+++ b/sys/kern/tty_subr.c
@@ -6,7 +6,7 @@
* of this software, nor does the author assume any responsibility
* for damages incurred with its use.
*
- * $Id: tty_subr.c,v 1.13 1995/09/09 18:10:10 davidg Exp $
+ * $Id: tty_subr.c,v 1.14 1995/10/25 17:59:58 bde Exp $
*/
/*
@@ -349,8 +349,13 @@ putc(chr, clistp)
s = spltty();
if (clistp->c_cl == NULL) {
- if (clistp->c_cbreserved < 1)
- panic("putc to a clist with no reserved cblocks");
+ if (clistp->c_cbreserved < 1) {
+ splx(s);
+#ifdef DIAGNOSTIC
+ printf("putc to a clist with no reserved cblocks");
+#endif
+ return (-1);
+ }
cblockp = cblock_alloc();
clistp->c_cbcount = 1;
clistp->c_cf = clistp->c_cl = cblockp->c_info;
@@ -425,8 +430,13 @@ b_to_q(src, amount, clistp)
* then get one.
*/
if (clistp->c_cl == NULL) {
- if (clistp->c_cbreserved < 1)
- panic("b_to_q to a clist with no reserved cblocks");
+ if (clistp->c_cbreserved < 1) {
+ splx(s);
+#ifdef DIAGNOSTIC
+ printf("b_to_q to a clist with no reserved cblocks");
+#endif
+ return (amount);
+ }
cblockp = cblock_alloc();
clistp->c_cbcount = 1;
clistp->c_cf = clistp->c_cl = cblockp->c_info;