[gpm] Default handlers and gpm 1.20.3
Samuel Thibault
samuel.thibault@ens-lyon.org
Fri Mar 21 21:06:05 CET 2008
Hello,
Default handlers got broken again with commit
eeaccd9e81d02b8ba390fb3fd073d4dae08bd023
Please apply attached patch.
Samuel
-------------- 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 gpm
mailing list