[gpm] gpm-1.20.2-broken

Samuel Thibault samuel.thibault@ens-lyon.org
Thu May 17 01:46:44 CEST 2007


Hi,

Samuel Thibault, le Thu 17 May 2007 01:22:22 +0200, a écrit :
> As I reported some time ago, default handlers don't work anymore with
> version 1.20.  Could you apply the attached patch for making them work
> again?

Mm, that one should be better.

Samuel
-------------- next part --------------
--- gpm-1.20.2-broken/src/lib/liblow.c.orig	2007-05-17 01:09:32.000000000 +0200
+++ gpm-1.20.2-broken/src/lib/liblow.c	2007-05-17 01:45:17.000000000 +0200
@@ -363,7 +363,7 @@
          }
          memcpy(tty, console_name, strlen(console_name) - 1);
          sprintf(&tty[strlen(console_name) - 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 */
@@ -380,7 +380,8 @@
          }
 
          conn->vc = atoi(&tty[strlen(console_name) - 1]);
-      }
+      } else /* a default handler -- use console */
+        tty = strdup(console_name);
 
       if (gpm_consolefd == -1) {
          if ((gpm_consolefd = open(tty, O_WRONLY)) < 0) {


More information about the gpm mailing list