Bug#472062: gpm: Default handlers don't work any more

Samuel Thibault samuel.thibault at ens-lyon.org
Fri Mar 21 19:53:53 UTC 2008


Package: gpm
Version: 1.20.3~pre3-3
Severity: important
Tags: patch

Hello,

Since the upload of version 1.20.*, default gpm handlers don't work any
more (e.g. brltty on the main console). Here is a fix.

Samuel

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.24.1
Locale: LANG=fr_FR at euro, LC_CTYPE=fr_FR at euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

Versions of packages gpm depends on:
ii  debconf [debconf-2.0]      1.5.19        Debian configuration management sy
ii  debianutils                2.28.4        Miscellaneous utilities specific t
ii  libc6                      2.7-6         GNU C Library: Shared libraries
ii  libgpmg1                   1.20.3~pre3-3 General Purpose Mouse - shared lib
ii  lsb-base                   3.1-24        Linux Standard Base 3.1 init scrip
ii  ucf                        3.005         Update Configuration File: preserv

gpm recommends no packages.

-- debconf information:
* gpm/responsiveness:
* gpm/repeat_type: ms3
* gpm/append:
* gpm/restart: false
* gpm/sample_rate:
* gpm/type: autops2
* gpm/device: /dev/input/mice
* gpm/restart_default: true

-- 
Samuel
"I don't know why, but first C programs tend to look a lot worse than
first programs in any other language (maybe except for fortran, but then
I suspect all fortran programs look like `firsts')"
(By Olaf Kirch)
-------------- next part --------------
--- gpm-1.20.3~pre3/src/lib/liblow.c.orig	2008-03-21 19:48:29.000000000 +0000
+++ gpm-1.20.3~pre3/src/lib/liblow.c	2008-03-21 19:49:00.000000000 +0000
@@ -249,7 +249,7 @@
             gpm_report(GPM_PR_OOPS,GPM_MESS_NO_MEM);
          memcpy(tty, consolename, strlen(consolename)-1);
          sprintf(&tty[strlen(consolename) - 1], "%i", flag);
-      } else { /* use your current vc */ 
+      } else if (flag==0) { /* use your current vc */ 
          if (isatty(0)) tty = ttyname(0);             /* stdin */
          if (!tty && isatty(1)) tty = ttyname(1);     /* stdout */
          if (!tty && isatty(2)) tty = ttyname(2);     /* stderr */
@@ -259,7 +259,8 @@
          }   
           
          conn->vc=atoi(&tty[strlen(consolename)-1]);
-      }
+      } else /* a default handler -- use console */
+        tty=strdup(consolename);
 
       if (gpm_consolefd == -1)
          if ((gpm_consolefd=open(tty,O_WRONLY)) < 0) {


More information about the pkg-gpm-devel mailing list