22 lines
919 B
Diff
22 lines
919 B
Diff
--- gpm-1.20.1/src/lib/liblow.c.default-handler 2007-05-23 15:15:01.000000000 +0200
|
|
+++ gpm-1.20.1/src/lib/liblow.c 2007-05-23 15:16:26.000000000 +0200
|
|
@@ -250,7 +250,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 */
|
|
@@ -271,7 +271,8 @@
|
|
}
|
|
#endif
|
|
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) {
|