Date: Tue, 24 Jun 1997 23:43:22 +0200 (MET DST)
From: Geert Uytterhoeven <Geert.Uytterhoeven@thomas.kotnet.org>
To: Linux/m68k <linux-m68k@phil.uni-sb.de>
Subject: L68K: More miscellaneous fixes for 2.1.42
Sender: owner-linux-m68k@phil.uni-sb.de
Reply-To: Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be>


More miscellaneous fixes for 2.1.42:

  - If you change the font on one virtual console, don't change the winsize
    for all virtual consoles.

  - Detect an incoming BREAK on the Amiga's builtin serial port.


--- linux-2.1.42/drivers/char/console.c.orig	Mon Jun 16 21:44:05 1997
+++ linux-2.1.42/drivers/char/console.c	Tue Jun 24 23:17:50 1997
@@ -514,7 +514,7 @@
 	unsigned long occ, oll, oss, osr;
 	unsigned short *newscreen;
 	long ol, nl, rlth, rrem;
-	struct winsize ws;
+	struct winsize ws, *cws;
 
 	if (!cols || !lines || currcons >= MAX_NR_CONSOLES)
 	    return;
@@ -577,12 +577,13 @@
 	    gotoxy(currcons, x, y);
 	    save_cur(currcons);
 
+	    cws = &console_table[currcons]->winsize;
 	    ws.ws_row = video_num_lines;
 	    ws.ws_col = video_num_columns;
-	    if (memcmp(&ws, &console_table[currcons]->winsize,
-		sizeof (struct winsize)) && console_table[currcons]->pgrp > 0)
+	    if ((ws.ws_row != cws->ws_row || ws.ws_col != cws->ws_col) &&
+		console_table[currcons]->pgrp > 0)
 		kill_pg(console_table[currcons]->pgrp, SIGWINCH, 1);
-	    console_table[currcons]->winsize = ws;
+	    *cws = ws;
 	}
 
 	/* don't update in graphics mode */
--- linux-2.1.42/drivers/char/amiga_ser.c.orig	Sun May 18 23:36:28 1997
+++ linux-2.1.42/drivers/char/amiga_ser.c	Tue Jun 24 22:24:31 1997
@@ -12,6 +12,7 @@
  *            AMIGA_VERTB interrupts into the init/deinit funtions as
  *            there is no reason to service the ser_vbl_int when the
  *            serial port is not in use.
+ * 30/04/96 - Geert Uytterhoeven: Added incoming BREAK detection
  *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file COPYING in the main directory of this archive
@@ -210,14 +211,19 @@
 static void ser_rx_int(int irq, void *data, struct pt_regs *fp)
 {
       struct async_struct *info = data;
-      int ch;
+      int ch, err;
 
       ch = custom.serdatr;
 
       custom.intreq = IF_RBF;
 
-      rs_receive_char(info, ch & 0xff, 
-		      ch & SDR_OVRUN ? TTY_OVERRUN : 0);
+      if ((ch & 0x1ff) == 0)
+	  err = TTY_BREAK;
+      else if (ch & SDR_OVRUN)
+	  err = TTY_OVERRUN;
+      else
+	  err = 0;
+      rs_receive_char(info, ch & 0xff, err);
 }
 
 static void ser_tx_int( int irq, void *data, struct pt_regs *fp)
--- linux-2.1.42/drivers/char/vt.c.orig	Sun May 18 23:36:35 1997
+++ linux-2.1.42/drivers/char/vt.c	Tue Jun 24 23:16:59 1997
@@ -438,7 +438,15 @@
 			if (i)
 				return i;
 			i = con_adjust_height(cfdarg.charheight);
+#ifdef CONFIG_ABSTRACT_CONSOLE
+			/*
+			 *  ++Geert: vc_resize_con() will take note of the
+			 *	     changed screen size, if necessary
+			 */
+			return (i <= 0) ? i : 0;
+#else
 			return (i <= 0) ? i : kd_size_changed(i, 0);
+#endif
 		} else
 			return -EINVAL;
 	case GIO_FONTX:
@@ -1091,7 +1099,14 @@
 		if (i) return i;
 
 		i = con_adjust_height(default_font_height);
+#ifdef CONFIG_ABSTRACT_CONSOLE
+			/*
+			 *  ++Geert: vc_resize_con() will take note of the
+			 *	     changed screen size, if necessary
+			 */
+#else
 		if ( i > 0 ) kd_size_changed(i, 0);
+#endif
 		con_set_default_unimap();
 
 		return 0;

Greetings,

						Geert

--
Geert Uytterhoeven                   Geert.Uytterhoeven@thomas.kotnet.org
Linux/m68k on Amiga, Wavelets        http://www.cs.kuleuven.ac.be/~geert/
KotNET@Thomas Network Administration -- Make you bed part of Cyberspace!!


