- applied patch for #240389, fixing default handlers

This commit is contained in:
Tomas Janousek 2007-05-23 13:21:18 +00:00
parent fd97f4977d
commit aab7e16a18
2 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,21 @@
--- 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) {

View File

@ -1,7 +1,7 @@
Summary: A mouse server for the Linux console.
Name: gpm
Version: 1.20.1
Release: 83%{?dist}
Release: 84%{?dist}
License: GPL
Group: System Environment/Daemons
Source: http://ftp.linux.it/pub/People/rubini/gpm/%{name}-%{version}.tar.gz
@ -22,6 +22,7 @@ Patch21: gpm-1.20.1-lib-silent.patch
Patch22: gpm-1.20.1-close-fds.patch
Patch23: gpm-1.20.1-aligned-sleep.patch
Patch24: gpm-1.20.1-deadsocket.patch
Patch25: gpm-1.20.1-default-handler.patch
Prereq: /sbin/chkconfig /sbin/ldconfig /sbin/install-info
Requires: bash >= 2.0
@ -68,6 +69,7 @@ mouse button.
%patch22 -p1 -b .close-fds
%patch23 -p1 -b .aligned-sleep
%patch24 -p1 -b .deadsocket
%patch25 -p1 -b .default-handler
%build
rm -f configure
@ -186,6 +188,9 @@ fi
%{_libdir}/libgpm.so
%changelog
* Wed May 23 2007 Tomas Janousek <tjanouse@redhat.com> - 1.20.1-84
- applied patch for #240389, fixing default handlers
* Thu May 03 2007 Tomas Janousek <tjanouse@redhat.com> - 1.20.1-83
- gpm-devel now requires version-release correctly, fixes #238785