www.nico.schottelius.org/software/gpm/browse_source/gpm-1.99.3/patches/1.20.1/samuel-liblow-patch-gpm-1.20.3
Nico Schottelius 95a46c5577 import gpm from unix.schottelius.org
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
2009-10-08 22:52:35 +02:00

21 lines
935 B
Groff

--- 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) {