To: linux-m68k@phil.uni-sb.de
Subject: Re: L68K: gpm crashes in 2.1.42
References: <Pine.GSO.3.95Lrindlow.970601022424.28712L-100000@tingeling.lysator.liu.se>
From: Jes Sorensen <Jes.Sorensen@cern.ch>
Date: 02 Jun 1997 10:34:01 +0200
In-Reply-To: Tomas Berndtsson's message of Sun, 1 Jun 1997 02:31:58 +0200 (MET DST)
Sender: owner-linux-m68k@phil.uni-sb.de
Reply-To: linux-m68k@phil.uni-sb.de

>>>>> "Tomas" == Tomas Berndtsson <tobe@lysator.liu.se> writes:

Tomas> Hi!  I got the error that follows when I tried to cut text with
Tomas> gpm, i.e.  pressed the left mousebutton.

Tomas> I use /dev/mouse which is linked to /dev/atarimouse on my
Tomas> Falcon. I also tried X, which also uses /dev/mouse, but it
Tomas> works fine.

Tomas> I have gpm version 1.12. It works fine in previous kernels.

Hmmm bug of mine, please try this patch.

Jes

--- /tmp/linux/drivers/char/selection.c	Mon May 26 16:14:38 1997
+++ linux/drivers/char/selection.c	Mon Jun  2 09:18:21 1997
@@ -103,7 +103,8 @@
 /* does screen address p correspond to character at LH/RH edge of screen? */
 static inline int atedge(const int p)
 {
-	return (!(p % video_size_row) || !((p + 2) % video_size_row));
+	return (!(p % get_video_size_row(fg_console))
+		|| !((p + 2) % get_video_size_row(fg_console)));
 }
 
 /* constrain v such that v <= u */
