Default handlers and gpm 1.20.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Default handlers got broken again with commit

eeaccd9e81d02b8ba390fb3fd073d4dae08bd023

Please apply attached patch.

Samuel
--- 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) {
_______________________________________________
gpm mailing list
gpm@xxxxxxxxxxxxxx
http://lists.linux.it/listinfo/gpm

[Index of Archives]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Gimp]     [Yosemite News]