gpm/gpm-1.20.1-gpmopen.patch

24 lines
918 B
Diff
Raw Normal View History

diff -pruN gpm-1.20.1/src/lib/liblow.c.orig gpm-1.20.1/src/lib/liblow.c
--- gpm-1.20.1/src/lib/liblow.c.orig 2003-08-03 17:55:00.000000000 +0200
+++ gpm-1.20.1/src/lib/liblow.c 2003-08-03 17:59:49.000000000 +0200
@@ -199,8 +199,6 @@ int Gpm_Open(Gpm_Connect *conn, int flag
Gpm_Stst *new = NULL;
char* sock_name = 0;
- option.consolename = NULL;
-
#if 0
gpm_report(GPM_PR_DEBUG,"VC: %d",flag);
#endif
@@ -259,6 +257,10 @@ int Gpm_Open(Gpm_Connect *conn, int flag
gpm_report(GPM_PR_ERR,"checking tty name failed");
goto err;
}
+ if (option.consolename == NULL) {
+ gpm_report(GPM_PR_ERR,"option.consolename not set");
+ goto err;
+ }
/* do we really need this check ? */
if(strncmp(tty,option.consolename,strlen(option.consolename)-1)
|| !isdigit(tty[strlen(option.consolename)-1])) {