From aab7e16a18961cee1179ec5c5042b2be47b01d4a Mon Sep 17 00:00:00 2001 From: Tomas Janousek Date: May 23 2007 13:21:18 +0000 Subject: - applied patch for #240389, fixing default handlers --- diff --git a/gpm-1.20.1-default-handler.patch b/gpm-1.20.1-default-handler.patch new file mode 100644 index 0000000..13cb5fe --- /dev/null +++ b/gpm-1.20.1-default-handler.patch @@ -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) { diff --git a/gpm.spec b/gpm.spec index da9ef24..47dff7c 100644 --- a/gpm.spec +++ b/gpm.spec @@ -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 - 1.20.1-84 +- applied patch for #240389, fixing default handlers + * Thu May 03 2007 Tomas Janousek - 1.20.1-83 - gpm-devel now requires version-release correctly, fixes #238785