SHA256
1
0
forked from pool/gpm
OBS User unknown 2006-12-18 23:16:41 +00:00 committed by Git OBS Bridge
commit 947d165a43
23 changed files with 3491 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

14
README.SuSE Normal file
View File

@ -0,0 +1,14 @@
Dear customer,
gpm is using more and more config files in /etc. Therefore we moved
all config files into /etc/gpm and removed "gpm-" from config file
names.
For example:
/etc/gpm-root.conf -> /etc/gpm/root.conf
/etc/gpm-syn.conf -> /etc/gpm/syn.conf
...
Have a lot of fun,
Your SuSE team

22
gpm-1.20.1-Gpm_Open.patch Normal file
View File

@ -0,0 +1,22 @@
--- src/lib/liblow.c
+++ src/lib/liblow.c
@@ -199,7 +199,7 @@
Gpm_Stst *new = NULL;
char* sock_name = 0;
- option.consolename = NULL;
+ if (checked_con == 0) option.consolename = NULL;
gpm_report(GPM_PR_DEBUG,"VC: %d",flag);
@@ -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])) {

59
gpm-1.20.1-ceil.patch Normal file
View File

@ -0,0 +1,59 @@
Note that GCC 4.0 will optimize ceil (constant), we therefore
have to make the argument non-constant.
--- configure.in
+++ configure.in
@@ -91,6 +91,25 @@
AC_CHECK_FUNCS(vsyslog syslog)
AC_FUNC_ALLOCA
+AC_MSG_CHECKING(for ceil)
+AC_TRY_LINK([#define __NO_MATH_INLINES 1
#include <math.h>
+ double d;],
+ [d = ceil(1.0*d);],
+ SYNLDFLAGS=""
+ AC_MSG_RESULT(yes),
+ SYNLDFLAGS=-lm
+ AC_MSG_RESULT(no))
+
+if test "$SYNLDFLAGS" = "-lm" ; then
+ SAVE_LIBS="$LIBS"
+ AC_CHECK_LIB(m,
+ ceil,
+ ,
+ echo "libmath.so is needed due the ceil function"
+ exit 1)
+ LIBS="$SAVE_LIBS"
+fi
+
case $with_curses in
No|no|N|n) SHARED_LIBS=-lc ;;
*)
@@ -123,6 +142,7 @@
AC_SUBST(SHLIB)
AC_SUBST(PICFLAGS)
AC_SUBST(SOLDFLAGS)
+AC_SUBST(SYNLDFLAGS)
AC_SUBST(CURSES_OBJS)
AC_SUBST(SHARED_LIBS)
AC_SUBST(lispdir)
--- src/Makefile.in
+++ src/Makefile.in
@@ -70,6 +70,7 @@
all: gpm lib/@SHLIB@ lib/libgpm.a $(PROG)
gpm: $(GOBJ)
+ $(CC) @LDFLAGS@ @SYNLDFLAGS@ $(GOBJ) -o gpm
# construct dependings of sourcefiles and link sourcefiles
$(DEPFILE) dep: prog/gpm-root.c
@@ -154,7 +155,7 @@
lib/libgpm.so.@abi_full@: $(PICS)
$(CC) @SOLDFLAGS@libgpm.so.@abi_lev@ \
- @LDFLAGS@ $(LDFLAGS) -o lib/libgpm.so.@abi_full@ $^ @LIBS@ @SHARED_LIBS@ $(LIBS)
+ @LDFLAGS@ $(LDFLAGS) -o lib/libgpm.so.@abi_full@ $^ @LIBS@ @SHARED_LIBS@ @SYNLDFLAGS@ $(LIBS)
lib/libgpm.so: lib/libgpm.so.@abi_full@
$(LN_S) -f libgpm.so.@abi_full@ lib/libgpm.so

175
gpm-1.20.1-conf.patch Normal file
View File

@ -0,0 +1,175 @@
--- README
+++ README
@@ -102,7 +102,7 @@
(string-match "con.*" (getenv "TERM"))))
(load-library "t-mouse"))
-* If you want to use gpm-root, copy gpm-root.conf to your /usr/etc
+* If you want to use gpm-root, copy gpm-root.conf to your /etc/gpm/root.conf
directory, test it out and then edit it to suit your feels.
* You'd like to name the gpm info file inside /usr/info/dir. Just insert
--- doc/README.silitek
+++ doc/README.silitek
@@ -14,11 +14,11 @@
Both types of mouse driver uses the system wide configuration file
- /etc/gpm-silitek.conf
+ /etc/gpm/silitek.conf
which defines the return values of any key not being mouse button
or mouse stick. For this keys the drag mouse button works as a
-modifier: pressed once, the last column in /etc/gpm-silitek.conf
+modifier: pressed once, the last column in /etc/gpm/silitek.conf
is used. To switch back to the normal return values, the drag mouse
button has to be pressed again. It is allowed to use escaped
sequences as return values. Characters other than printable can
@@ -169,7 +169,7 @@
--------------------------------------------------------------------
the Multimedia keys on IR Keyboard SK-7100 are usable (for ncurses
-based programs see below). After editing /etc/gpm-silitek.conf
+based programs see below). After editing /etc/gpm/silitek.conf
to get the similar named keys to work similar, both the IR Keyboard
SK-7100 and the IR commander SM-1000 are usable in parallel.
--- doc/README.synaptics
+++ doc/README.synaptics
@@ -25,8 +25,8 @@
These features can be enabled/disabled and many of them have time and speed
parameters which can be adjusted to the taste of the user. These parameters
-can be provided in the "/usr/etc/gpm-syn.conf" file (or
-/usr/local/etc/gpm-syn.conf, or /etc/gpm-syn.conf, according to how you ran
+can be provided in the "/etc/gpm/syn.conf" file (or /usr/etc/syn.conf
+/usr/local/etc/syn.conf, or /etc/syn.conf, according to how you ran
configure). Each line in this file has the following syntax: [param-name]
<value>
--- doc/README.twiddler
+++ doc/README.twiddler
@@ -101,23 +101,23 @@
file, and provide documentation as well. Using a compulsory
configuration file reliefs my workload :-)
-The file "gpm-twiddler.conf" that appears in the gpm configuration
+The file "twiddler.conf" that appears in the gpm configuration
includes the default keyboard map, and can be used right away. If the
file is not in place, gpm will complain about its absence. By default
-the file must live in /usr/etc (or /usr/local/etc, or whatever you
+the file must live in /etc/gpm (or /usr/local/etc, or whatever you
gave as a prefix to ./configure). The behaviour is similar for
different installation prefixes. The file is not installed by "make
install". If the file is missing, gpm will exit producing a message
like this:
- ./gpm: /usr/etc/gpm-twiddler.conf: No such file or directory
+ ./gpm: /etc/gpm/twiddler.conf: No such file or directory
The distributed configuration file includes its own documentation.
If you want to add keys to the default file, you can avoid editing it
-by writing a "gpm-twiddler.user" file and putting it in the same
-directory as gpm-twiddler.conf. Gpm will read both files, in sequence,
-but won't complain if gpm-twiddler.user doesn't exist.
+by writing a "twiddler.user" file and putting it in the same
+directory as twiddler.conf. Gpm will read both files, in sequence,
+but won't complain if twiddler.user doesn't exist.
Gpm will print an error message for any incorrect line in any of the
configuration files: error messages include the file name and the
--- doc/doc.gpm.in
+++ doc/doc.gpm.in
@@ -1981,7 +1981,7 @@
@item -u
Deny using user-specific configuration files. With this
- option on, only @file{/etc/gpm-root.conf} will be used as a source
+ option on, only @file{/etc/gpm/root.conf} will be used as a source
of configuration information. This option
is intended for those system administrators who fear security could
be broken by this daemon. Things should be sufficiently secure, but
@@ -2009,7 +2009,7 @@
the daemon.
%M The actual configuration file is better introduced by looking at your
-%M @file{/etc/gpm-root.conf}.
+%M @file{/etc/gpm/root.conf}.
%M
%MSKIP
@@ -2196,7 +2196,7 @@
.SH FILES
.nf
/dev/gpmctl The socket used to connect to gpm.
-/etc/gpm-root.conf The default configuration file.
+/etc/gpm/root.conf The default configuration file.
$(HOME)/.gpm-root The user configuration file.
/dev/vcs* Virtual Console Screens
.fi
--- doc/gpm.info
+++ doc/gpm.info
@@ -1604,7 +1604,7 @@
`-u'
Deny using user-specific configuration files. With this option on,
- only `/etc/gpm-root.conf' will be used as a source of
+ only `/etc/gpm/root.conf' will be used as a source of
configuration information. This option is intended for those
system administrators who fear security could be broken by this
daemon. Things should be sufficiently secure, but if you find a
--- src/headers/silitek.h
+++ src/headers/silitek.h
@@ -27,7 +27,7 @@
extern void silitek_keys_ps2(unsigned char *data, int *drag);
extern int silitek_ghost_ps2(unsigned char *data);
extern int fd_silitek;
-#define SILI_SYSTEM_FILE SYSCONFDIR "/gpm-silitek.conf"
+#define SILI_SYSTEM_FILE SYSCONFDIR "/silitek.conf"
#define SILISTRLEN 32
#define SILISTRSCN "key %32s %32s %32s"
extern void silitek_mapping(void);
--- src/headers/twiddler.h
+++ src/headers/twiddler.h
@@ -46,7 +46,7 @@
#define TW_M_MASK 0x1FF /* mask of movement bits, after shifting */
#define TW_M_BIT 0x100
-#define TW_SYSTEM_FILE SYSCONFDIR "/gpm-twiddler.conf"
-#define TW_CUSTOM_FILE SYSCONFDIR "/gpm-twiddler.user"
+#define TW_SYSTEM_FILE SYSCONFDIR "/twiddler.conf"
+#define TW_CUSTOM_FILE SYSCONFDIR "/twiddler.user"
--- src/prog/gpm-root.y
+++ src/prog/gpm-root.y
@@ -78,7 +78,7 @@
#endif
#define USER_CFG ".gpm-root"
-#define SYSTEM_CFG SYSCONFDIR "/gpm-root.conf"
+#define SYSTEM_CFG SYSCONFDIR "/root.conf"
#define DEFAULT_FORE 7
#define DEFAULT_BACK 0
--- src/synaptics.c
+++ src/synaptics.c
@@ -2047,7 +2047,7 @@
** syn_read_config_file
**
** Read the configuration data from the global config file
-** SYSCONFDIR "/gpm-syn.conf".
+** SYSCONFDIR "/syn.conf".
*/
void tp_read_config_file (char* config_filename)
{
@@ -2171,7 +2171,7 @@
gpm_report (GPM_PR_INFO, " Firmware version %d.%d\n",
ident.info_major, ident.info_minor);
- tp_read_config_file ("gpm-syn.conf");
+ tp_read_config_file ("syn.conf");
/* Limit the options depending on the touchpad capabilities. This should be

View File

@ -0,0 +1,28 @@
--- src/headers/message.h
+++ src/headers/message.h
@@ -145,6 +145,7 @@
#define GPM_MESS_SETSID_FAILED "Setsid failed"
#define GPM_MESS_CHDIR_FAILED "change directory failed"
#define GPM_MESS_FORK_FAILED "Fork failed."
+#define GPM_MESS_DAEMON_FAILED "Change to run in background failed."
#define GPM_MESS_VCCHECK "Failed on virtual console check."
#define GPM_MESS_PROT_ERR "Error in protocol"
#define GPM_MESS_ROOT "You should be root to run gpm!"
--- src/startup.c
+++ src/startup.c
@@ -136,13 +136,8 @@
if(option.run_status == GPM_RUN_STARTUP ) { /* else is debugging */
/* goto background and become a session leader (Stefan Giessler) */
- switch(fork()) {
- case -1: gpm_report(GPM_PR_OOPS,GPM_MESS_FORK_FAILED); /* error */
- case 0: option.run_status = GPM_RUN_DAEMON; break; /* child */
- default: _exit(0); /* parent */
- }
-
- if (setsid() < 0) gpm_report(GPM_PR_OOPS,GPM_MESS_SETSID_FAILED);
+ if (daemon(0,0)) gpm_report(GPM_PR_OOPS,GPM_MESS_DAEMON_FAILED); /* error */
+ option.run_status = GPM_RUN_DAEMON;
}
/* damon init: check whether we run or not, display message */

View File

@ -0,0 +1,11 @@
--- src/mice.c
+++ src/mice.c
@@ -2275,7 +2275,7 @@
for (i=0; i<4; i++)
if (gunze_calib[i] & ~1023) calibok = 0;
if (gunze_calib[0] == gunze_calib[2]) calibok = 0;
- if (gunze_calib[1] == gunze_calib[4]) calibok = 0;
+ if (gunze_calib[1] == gunze_calib[3]) calibok = 0;
fclose(f);
}
if (!calibok) {

View File

@ -0,0 +1,51 @@
--- src/Makefile.in
+++ src/Makefile.in
@@ -14,7 +14,7 @@
# Main portion: regular build rules
GSRC = main.c gpm.c gpn.c mice.c special.c twiddler.c synaptics.c silitek.c \
- startup.c server_tools.c
+ startup.c
GOBJ = $(GSRC:.c=.o) report.o tools.o
--- src/gpn.c
+++ src/gpn.c
@@ -254,15 +254,12 @@
case 'i': opt_time=atoi(optarg); break;
case 'k': check_kill(); break;
case 'l': opt_lut = optarg; break;
- case 'm': add_mouse(GPM_ADD_DEVICE,optarg);
- opt_dev = optarg; break; /* GO AWAY!*/
+ case 'm': opt_dev = optarg; break; /* GO AWAY!*/
case 'M': opt_double++; option.repeater++;
if (option.repeater_type == 0)
option.repeater_type = "msc";
which_mouse=mouse_table+2; break;
- case 'o': add_mouse(GPM_ADD_OPTIONS,optarg);
- gpm_report(GPM_PR_DEBUG,"options: %s",optarg);
- opt_options = optarg; break; /* GO AWAY */
+ case 'o': opt_options = optarg; break; /* GO AWAY */
case 'p': opt_ptrdrag = 0; break;
case 'r':
/* being called responsiveness, I must take the inverse */
@@ -276,8 +273,7 @@
case 's': opt_sample = atoi(optarg); break;
case 'S': if (optarg) opt_special = optarg;
else opt_special=""; break;
- case 't': add_mouse(GPM_ADD_TYPE,optarg);
- opt_type = optarg; break; /* GO AWAY */
+ case 't': opt_type = optarg; break; /* GO AWAY */
case 'u': option.autodetect = 1; break;
case 'T': opt_test++; break;
case 'v': printf(GPM_MESS_VERSION "\n"); exit(0);
--- src/startup.c
+++ src/startup.c
@@ -158,7 +158,6 @@
/****************** OLD CODE from gpn.c END ***********************/
- init_mice(option.micelist); /* reads option.micelist */
atexit(gpm_exited); /* call gpm_exited at the end */
}

View File

@ -0,0 +1,33 @@
--- src/headers/gpmInt.h
+++ src/headers/gpmInt.h
@@ -91,21 +91,27 @@
/*** mouse commands ***/
-#define GPM_AUX_SEND_ID 0xF2
+#define GPM_AUX_SEND_ID 0xF2 /* Get ID: ACK + 1 byte ID */
#define GPM_AUX_ID_ERROR -1
#define GPM_AUX_ID_PS2 0
#define GPM_AUX_ID_IMPS2 3
/* these are shameless stolen from /usr/src/linux/include/linux/pc_keyb.h */
-#define GPM_AUX_SET_RES 0xE8 /* Set resolution */
#define GPM_AUX_SET_SCALE11 0xE6 /* Set 1:1 scaling */
#define GPM_AUX_SET_SCALE21 0xE7 /* Set 2:1 scaling */
-#define GPM_AUX_GET_SCALE 0xE9 /* Get scaling factor */
+#define GPM_AUX_SET_RES 0xE8 /* Set resolution */
+#define GPM_AUX_GET_SCALE 0xE9 /* Get scaling factor: ACK + 3 byte status pack */
#define GPM_AUX_SET_STREAM 0xEA /* Set stream mode */
+#define GPM_AUX_GET_DATA 0xEB /* Read data: ACK + 3 byte movement pack */
+#define GPM_AUX_RESET_WRAP 0xEC /* From wrap mode to previous */
+#define GPM_AUX_SET_WRAP 0xEE /* Set wrap mode */
+#define GPM_AUX_SET_REMOTE 0xF0 /* Set remote mode */
#define GPM_AUX_SET_SAMPLE 0xF3 /* Set sample rate */
#define GPM_AUX_ENABLE_DEV 0xF4 /* Enable aux device */
#define GPM_AUX_DISABLE_DEV 0xF5 /* Disable aux device */
+#define GPM_AUX_DEFAULTS 0xF6 /* Reset to defaults */
+#define GPM_AUX_RESEND 0xFE /* Resend last pack */
#define GPM_AUX_RESET 0xFF /* Reset aux device */
#define GPM_AUX_ACK 0xFA /* Command byte ACK. */

11
gpm-1.20.1-ps2_read.patch Normal file
View File

@ -0,0 +1,11 @@
--- src/gpm.c
+++ src/gpm.c
@@ -366,7 +366,7 @@
if((i=m_type->packetlen-howmany)) /* still to get */
do {
- j = read(fd,edata-i,i); /* edata is pointer just after data */
+ j = read(fd,edata-i,howmany); /* edata is pointer just after data */
if (kd_mode!=KD_TEXT && fifofd != -1 && opt_rawrep && j > 0)
write(fifofd, edata-i, j);
i -= j;

View File

@ -0,0 +1,415 @@
--- src/gpm.c
+++ src/gpm.c
@@ -71,7 +71,8 @@
DEF_TIME, DEF_CLUSTER, DEF_THREE, DEF_GLIDEPOINT_TAP,
(char *)NULL /* extra */,
(Gpm_Type *)NULL,
- -1
+ -1,
+ 0, 0 /* save byte, is_save_byte */
}
};
struct mouse_features *which_mouse;
@@ -329,25 +330,57 @@
* fetch the actual device data from the mouse device, dependent on
* what Gpm_Type is being passed.
*-------------------------------------------------------------------*/
-static inline char *getMouseData(int fd, Gpm_Type *type, int kd_mode)
+static inline char *getMouseData(int fd, Gpm_Type *type, int kd_mode,
+ unsigned char *save_byte , int *is_save_byte,
+ int *restart)
{
static unsigned char data[32]; /* quite a big margin :) */
char *edata=data+type->packetlen;
int howmany=type->howmany;
+ int preread;
int i,j;
/*....................................... read and identify one byte */
- if (read(fd, data, howmany)!=howmany) {
- if (opt_test) exit(0);
- gpm_report(GPM_PR_ERR,GPM_MESS_READ_FIRST, strerror(errno));
- return NULL;
+ preread = 0;
+ if (*is_save_byte) {
+ /* one byte is saved, howmany must be 1 otherwise this
+ byte hasn't been saved */
+ data[0] = *save_byte;
+ *is_save_byte = 0;
+ preread = 1;
+ } else {
+ if ((preread = read(fd, data, howmany))!=howmany) {
+ if (opt_test) exit(0);
+ gpm_report(GPM_PR_ERR,GPM_MESS_READ_FIRST, strerror(errno));
+ return NULL;
+ }
+ }
+
+ /* try to find sequence AA 00 which is generated by kernel-2.4.9 or higher
+ when PS/2 mouse was replugged */
+ if ((m_type->isPS2 == 1) && (data[0] == 0xaa)) {
+ if (preread == 1) {
+ // read second byte
+ if (read(fd, &(data[1]),1) == 1)
+ preread += 1;
+ }
+ if ((preread >= 2) && (data[1] == 0x0)) {
+ gpm_report(GPM_PR_DEBUG,GPM_MESS_REPLUGGED);
+ *restart = 1;
+ return NULL;
+ }
}
if (kd_mode!=KD_TEXT && fifofd != -1 && opt_rawrep)
write(fifofd, data, howmany);
if ((data[0]&(m_type->proto)[0]) != (m_type->proto)[1]) {
+ if (preread > howmany) {
+ /* second byte was involuntary preread in test for PS/2 replugging */
+ *save_byte = data[1];
+ *is_save_byte = 1;
+ }
if (m_type->getextra == 1) {
data[1]=GPM_EXTRA_MAGIC_1; data[2]=GPM_EXTRA_MAGIC_2;
gpm_report(GPM_PR_DEBUG,GPM_EXTRA_DATA,data[0]);
@@ -357,6 +390,12 @@
return NULL;
}
+ if ((preread > howmany) &&
+ (kd_mode!=KD_TEXT && fifofd != -1 && opt_rawrep))
+ /* one byte was read in test for replugging sequence and will be
+ used as normal data byte */
+ write(fifofd, &(data[1]), 1);
+
/*....................................... read the rest */
/*
@@ -364,13 +403,20 @@
* tried ps2 with the original selection package, which called usleep()
*/
- if((i=m_type->packetlen-howmany)) /* still to get */
+ if((i=m_type->packetlen-preread) > 0) { /* still to get */
do {
j = read(fd,edata-i,howmany); /* edata is pointer just after data */
if (kd_mode!=KD_TEXT && fifofd != -1 && opt_rawrep && j > 0)
write(fifofd, edata-i, j);
i -= j;
} while (i && j);
+ } else {
+ if (preread > m_type->packetlen) {
+ /* second byte was involuntary preread in test for PS/2 replugging */
+ *save_byte = data[1];
+ *is_save_byte = 1;
+ }
+ }
if (i) {
gpm_report(GPM_PR_ERR,GPM_MESS_READ_REST, strerror(errno));
@@ -396,7 +442,7 @@
* the data via repeat_fun() to the repeater device
*-------------------------------------------------------------------*/
static inline int processMouse(int fd, Gpm_Event *event, Gpm_Type *type,
- int kd_mode)
+ int kd_mode, unsigned char *save_byte, int *is_save_byte)
{
char *data;
static int fine_dx, fine_dy;
@@ -408,6 +454,7 @@
fd_set fdSet;
static int newB=0, oldB=0, oldT=0; /* old buttons and Type to chain events */
/* static int buttonlock, buttonlockflag; */
+ int restart;
#define GET_TIME(tv) (gettimeofday(&tv, (struct timezone *)NULL))
#define DIF_TIME(t1,t2) ((t2.tv_sec -t1.tv_sec) *1000+ \
@@ -433,8 +480,11 @@
FD_ZERO(&fdSet); FD_SET(fd,&fdSet); i=0;
do { /* cluster loop */
- if(((data=getMouseData(fd,m_type,kd_mode))==NULL)
+ restart = 0;
+ if(((data=getMouseData(fd,m_type,kd_mode,
+ save_byte,is_save_byte,&restart))==NULL)
|| ((*(m_type->fun))(&nEvent,data)==-1) ) {
+ if (restart) return -1;
if (!i) return 0;
else break;
}
@@ -916,6 +966,32 @@
exit(0);
}
+static inline void initMouse(int i, int *fd, int *maxfd)
+{
+ which_mouse=mouse_table+i; /* used to access options */
+
+ if (!opt_dev) gpm_report(GPM_PR_OOPS,GPM_MESS_NEED_MDEV);
+
+ if(!strcmp(opt_dev,"-")) *fd=0; /* use stdin */
+ else if( (*fd=open(opt_dev,O_RDWR | O_NDELAY)) < 0)
+ gpm_report(GPM_PR_OOPS,GPM_MESS_OPEN,opt_dev);
+
+ /* and then reset the flag */
+ fcntl(*fd,F_SETFL,fcntl(*fd,F_GETFL) & ~O_NDELAY);
+
+ /* create argc and argv for this device */
+ mouse_argv[i] = build_argv(opt_type, opt_options, &mouse_argc[i], ',');
+
+ /* init the device, and use the return value as new mouse type */
+ if (m_type->init)
+ m_type=(m_type->init)(*fd, m_type->flags, m_type, mouse_argc[i],
+ mouse_argv[i]);
+ if (!m_type) gpm_report(GPM_PR_OOPS,GPM_MESS_MOUSE_INIT);
+
+ which_mouse->fd=*fd;
+ *maxfd=max(*fd, *maxfd);
+}
+
/*-------------------------------------------------------------------*/
int old_main()
{
@@ -928,28 +1004,7 @@
Gpm_Event event;
for (i = 1; i <= 1+opt_double; i++) {
- which_mouse=mouse_table+i; /* used to access options */
-
- if (!opt_dev) gpm_report(GPM_PR_OOPS,GPM_MESS_NEED_MDEV);
-
- if(!strcmp(opt_dev,"-")) fd=0; /* use stdin */
- else if( (fd=open(opt_dev,O_RDWR | O_NDELAY)) < 0)
- gpm_report(GPM_PR_OOPS,GPM_MESS_OPEN,opt_dev);
-
- /* and then reset the flag */
- fcntl(fd,F_SETFL,fcntl(fd,F_GETFL) & ~O_NDELAY);
-
- /* create argc and argv for this device */
- mouse_argv[i] = build_argv(opt_type, opt_options, &mouse_argc[i], ',');
-
- /* init the device, and use the return value as new mouse type */
- if (m_type->init)
- m_type=(m_type->init)(fd, m_type->flags, m_type, mouse_argc[i],
- mouse_argv[i]);
- if (!m_type) gpm_report(GPM_PR_OOPS,GPM_MESS_MOUSE_INIT);
-
- which_mouse->fd=fd;
- maxfd=max(fd, maxfd);
+ initMouse(i, &fd, &maxfd);
}
/*....................................... catch interesting signals */
@@ -1063,10 +1118,14 @@
*/
for (i=1; i <= 1+opt_double; i++) {
+ int rc;
which_mouse=mouse_table+i; /* used to access options */
if (FD_ISSET(which_mouse->fd,&selSet)) {
FD_CLR(which_mouse->fd,&selSet); pending--;
- if (processMouse(which_mouse->fd, &event, m_type, kd_mode))
+ rc = processMouse(which_mouse->fd, &event, m_type, kd_mode,
+ &(which_mouse->save_byte),
+ &(which_mouse->is_save_byte));
+ if (rc > 0) {
/* pass it to the client, if any
* or to the default handler, if any
* or to the selection handler
@@ -1075,7 +1134,15 @@
(cinfo[event.vc] && do_client(cinfo[event.vc], &event))
|| (cinfo[0] && do_client(cinfo[0], &event))
|| do_selection(&event);
+ } else if (rc == -1) {
+ /* try to reinitialise the mouse */
+ FD_CLR(which_mouse->fd, &selSet);
+ close(which_mouse->fd);
+ initMouse(i, &fd, &maxfd);
+ FD_CLR(which_mouse->fd, &selSet);
+ which_mouse->is_save_byte=0;
}
+ }
}
/*..................... got connection, process it */
--- src/headers/gpmInt.h
+++ src/headers/gpmInt.h
@@ -142,6 +142,7 @@
int (*repeat_fun)(Gpm_Event *state, int fd); /* repeat this event into fd */
/* itz Mon Jan 11 23:27:54 PST 1999 */
+ int isPS2; /* is 1 for PS/2 mouses, 0 otherwise */
} Gpm_Type;
#define GPM_EXTRA_MAGIC_1 0xAA
@@ -165,6 +166,8 @@
char *opt_options; /* extra textual configuration */
Gpm_Type *m_type;
int fd;
+ unsigned char save_byte;
+ int is_save_byte;
};
extern struct mouse_features mouse_table[3], *which_mouse; /*the current one*/
--- src/headers/message.h
+++ src/headers/message.h
@@ -65,6 +65,7 @@
#define GPM_MESS_VERSION "gpm " GPM_RELEASE " (X-Mas), " GPM_RELEASE_DATE
#define GPM_MESS_STARTED "Started gpm successfully. Entered daemon mode."
#define GPM_MESS_KILLED "Killed gpm(%d)."
+#define GPM_MESS_REPLUGGED "Mouse was replugged"
#define GPM_MESS_SKIP_DATA "Skipping a data packet (?)"
#define GPM_MESS_DATA_4 "Data %02x %02x %02x (%02x)"
#define GPM_MESS_NO_MAGIC "No magic"
--- src/mice.c
+++ src/mice.c
@@ -2217,113 +2217,113 @@
{"mman", "The \"MouseMan\" and similar devices (3/4 bytes per packet).",
"Mouseman", M_mman, I_serial, CS7 | STD_FLG, /* first */
- {0x40, 0x40, 0x40, 0x00}, 3, 1, 1, 0, 0},
+ {0x40, 0x40, 0x40, 0x00}, 3, 1, 1, 0, 0, 0},
{"ms", "The original ms protocol, with a middle-button extension.",
"", M_ms, I_serial, CS7 | STD_FLG,
- {0x40, 0x40, 0x40, 0x00}, 3, 1, 0, 0, 0},
+ {0x40, 0x40, 0x40, 0x00}, 3, 1, 0, 0, 0, 0},
{"acecad", "Acecad tablet absolute mode(Sumagrapics MM-Series mode)",
"", M_summa, I_summa, STD_FLG,
- {0x80, 0x80, 0x00, 0x00}, 7, 1, 0, 1, 0},
+ {0x80, 0x80, 0x00, 0x00}, 7, 1, 0, 1, 0, 0},
{"bare", "Unadorned ms protocol. Needed with some 2-buttons mice.",
"Microsoft", M_bare, I_serial, CS7 | STD_FLG,
- {0x40, 0x40, 0x40, 0x00}, 3, 1, 0, 0, 0},
+ {0x40, 0x40, 0x40, 0x00}, 3, 1, 0, 0, 0, 0},
{"bm", "Micro$oft busmice and compatible devices.",
"BusMouse", M_bm, I_empty, STD_FLG, /* bm is sun */
- {0xf8, 0x80, 0x00, 0x00}, 3, 3, 0, 0, 0},
+ {0xf8, 0x80, 0x00, 0x00}, 3, 3, 0, 0, 0, 0},
{"brw", "Fellowes Browser - 4 buttons (and a wheel) (dual protocol?)",
"", M_brw, I_pnp, CS7 | STD_FLG,
- {0xc0, 0x40, 0xc0, 0x00}, 4, 1, 0, 0, 0},
+ {0xc0, 0x40, 0xc0, 0x00}, 4, 1, 0, 0, 0, 0},
{"cal", "Calcomp UltraSlate",
"", M_calus, I_calus, CS8 | CSTOPB | STD_FLG,
- {0x80, 0x80, 0x80, 0x00}, 6, 6, 0, 1, 0},
+ {0x80, 0x80, 0x80, 0x00}, 6, 6, 0, 1, 0, 0},
{"calr", "Calcomp UltraSlate - relative mode",
"", M_calus_rel, I_calus, CS8 | CSTOPB | STD_FLG,
- {0x80, 0x80, 0x80, 0x00}, 6, 6, 0, 0, 0},
+ {0x80, 0x80, 0x80, 0x00}, 6, 6, 0, 0, 0, 0},
#ifdef HAVE_LINUX_INPUT_H
{"evdev", "Linux Event Device",
"", M_evdev, I_empty, STD_FLG,
- {0x00, 0x00, 0x00, 0x00} , 16, 16, 0, 0, NULL},
+ {0x00, 0x00, 0x00, 0x00} , 16, 16, 0, 0, NULL, 0},
#endif /* HAVE_LINUX_INPUT_H */
{"exps2", "IntelliMouse Explorer (ps2) - 3 buttons, wheel unused",
"ExplorerPS/2", M_imps2, I_exps2, STD_FLG,
- {0xc0, 0x00, 0x00, 0x00}, 4, 1, 0, 0, 0},
+ {0xc0, 0x00, 0x00, 0x00}, 4, 1, 0, 0, 0, 1},
#ifdef HAVE_LINUX_JOYSTICK_H
{"js", "Joystick mouse emulation",
"Joystick", M_js, NULL, 0,
- {0xFC, 0x00, 0x00, 0x00}, 12, 12, 0, 0, 0},
+ {0xFC, 0x00, 0x00, 0x00}, 12, 12, 0, 0, 0 ,0},
#endif
{"genitizer", "\"Genitizer\" tablet, in relative mode.",
"", M_geni, I_serial, CS8|PARENB|PARODD,
- {0x80, 0x80, 0x00, 0x00}, 3, 1, 0, 0, 0},
+ {0x80, 0x80, 0x00, 0x00}, 3, 1, 0, 0, 0, 0},
{"gunze", "Gunze touch-screens (only button-1 events, by now)",
"", M_gunze, I_gunze, STD_FLG,
- {0xF9, 0x50, 0xF0, 0x30}, 11, 1, 0, 1, NULL},
+ {0xF9, 0x50, 0xF0, 0x30}, 11, 1, 0, 1, NULL, 0},
{"imps2","Microsoft Intellimouse (ps2)-autodetect 2/3 buttons,wheel unused",
"", M_imps2, I_imps2, STD_FLG,
- {0xC0, 0x00, 0x00, 0x00}, 4, 1, 0, 0, R_imps2},
+ {0xC0, 0x00, 0x00, 0x00}, 4, 1, 0, 0, R_imps2 , 1},
{"logi", "Used in some Logitech devices (only serial).",
"Logitech", M_logi, I_logi, CS8 | CSTOPB | STD_FLG,
- {0xe0, 0x80, 0x80, 0x00}, 3, 3, 0, 0, 0},
+ {0xe0, 0x80, 0x80, 0x00}, 3, 3, 0, 0, 0, 0},
{"logim", "Turn logitech into Mouse-Systems-Compatible.",
"", M_logimsc, I_serial, CS8 | CSTOPB | STD_FLG,
- {0xf8, 0x80, 0x00, 0x00}, 5, 1, 0, 0, 0},
+ {0xf8, 0x80, 0x00, 0x00}, 5, 1, 0, 0, 0, 0},
{"mm", "MM series. Probably an old protocol...",
"MMSeries", M_mm, I_serial, CS8 | PARENB|PARODD | STD_FLG,
- {0xe0, 0x80, 0x80, 0x00}, 3, 1, 0, 0, 0},
+ {0xe0, 0x80, 0x80, 0x00}, 3, 1, 0, 0, 0, 0},
{"ms3", "Microsoft Intellimouse (serial) - 3 buttons, wheel unused",
"", M_ms3, I_pnp, CS7 | STD_FLG,
- {0xc0, 0x40, 0xc0, 0x00}, 4, 1, 0, 0, R_ms3},
+ {0xc0, 0x40, 0xc0, 0x00}, 4, 1, 0, 0, R_ms3, 0},
{"ms+", "Like 'ms', but allows dragging with the middle button.",
"", M_ms_plus, I_serial, CS7 | STD_FLG,
- {0x40, 0x40, 0x40, 0x00}, 3, 1, 0, 0, 0},
+ {0x40, 0x40, 0x40, 0x00}, 3, 1, 0, 0, 0, 0},
{"ms+lr", "'ms+', but you can reset m by pressing lr (see man page).",
"", M_ms_plus_lr, I_serial, CS7 | STD_FLG,
- {0x40, 0x40, 0x40, 0x00}, 3, 1, 0, 0, 0},
+ {0x40, 0x40, 0x40, 0x00}, 3, 1, 0, 0, 0, 0},
{"msc", "Mouse-Systems-Compatible (5bytes). Most 3-button mice.",
"MouseSystems", M_msc, I_serial, CS8 | CSTOPB | STD_FLG,
- {0xf8, 0x80, 0x00, 0x00}, 5, 1, 0, 0, R_msc},
+ {0xf8, 0x80, 0x00, 0x00}, 5, 1, 0, 0, R_msc, 0},
{"mtouch", "MicroTouch touch-screens (only button-1 events, by now)",
"", M_mtouch, I_mtouch, STD_FLG,
- {0x80, 0x80, 0x80, 0x00}, 5, 1, 0, 1, NULL},
+ {0x80, 0x80, 0x80, 0x00}, 5, 1, 0, 1, NULL, 0},
{"ncr", "Ncr3125pen, found on some laptops",
"", M_ncr, NULL, STD_FLG,
- {0x08, 0x08, 0x00, 0x00}, 7, 7, 0, 1, 0},
+ {0x08, 0x08, 0x00, 0x00}, 7, 7, 0, 1, 0, 0},
{"netmouse","Genius NetMouse (ps2) - 2 buttons and 2 buttons 'up'/'down'.",
"", M_netmouse, I_netmouse, CS7 | STD_FLG,
- {0xc0, 0x00, 0x00, 0x00}, 4, 1, 0, 0, 0},
+ {0xc0, 0x00, 0x00, 0x00}, 4, 1, 0, 0, 0 ,1},
{"pnp", "Plug and pray. New mice may not run with '-t ms'.",
"", M_bare, I_pnp, CS7 | STD_FLG,
- {0x40, 0x40, 0x40, 0x00}, 3, 1, 0, 0, 0},
+ {0x40, 0x40, 0x40, 0x00}, 3, 1, 0, 0, 0, 0},
{"ps2", "Busmice of the ps/2 series. Most busmice, actually.",
"PS/2", M_ps2, I_ps2, STD_FLG,
- {0xc0, 0x00, 0x00, 0x00}, 3, 1, 0, 0, R_ps2},
+ {0xc0, 0x00, 0x00, 0x00}, 3, 1, 0, 0, R_ps2, 1},
{"sun", "'msc' protocol, but only 3 bytes per packet.",
"", M_sun, I_serial, CS8 | CSTOPB | STD_FLG,
- {0xf8, 0x80, 0x00, 0x00}, 3, 1, 0, 0, 0},
+ {0xf8, 0x80, 0x00, 0x00}, 3, 1, 0, 0, 0, 0},
{"summa", "Summagraphics or Genius tablet absolute mode(MM-Series)",
"", M_summa, I_summa, STD_FLG,
- {0x80, 0x80, 0x00, 0x00}, 5, 1, 0, 1, R_summa},
+ {0x80, 0x80, 0x00, 0x00}, 5, 1, 0, 1, R_summa, 0},
{"syn", "The \"Synaptics\" serial TouchPad.",
"synaptics", M_synaptics_serial, I_serial, CS7 | STD_FLG,
- {0x40, 0x40, 0x40, 0x00}, 6, 6, 1, 0, 0},
+ {0x40, 0x40, 0x40, 0x00}, 6, 6, 1, 0, 0 ,0},
{"synps2", "The \"Synaptics\" PS/2 TouchPad",
"synaptics_ps2", M_synaptics_ps2, I_synps2, STD_FLG,
- {0x80, 0x80, 0x00, 0x00}, 6, 1, 1, 0, 0},
+ {0x80, 0x80, 0x00, 0x00}, 6, 1, 1, 0, 0, 1},
{"twid", "Twidddler keyboard",
"", M_twid, I_twid, CS8 | STD_FLG,
- {0x80, 0x00, 0x80, 0x80}, 5, 1, 0, 0, 0},
+ {0x80, 0x00, 0x80, 0x80}, 5, 1, 0, 0, 0 ,0},
{"vsxxxaa", "The DEC VSXXX-AA/GA serial mouse on DEC workstations.",
"", M_vsxxx_aa, I_serial, CS8 | PARENB | PARODD | STD_FLG,
- {0xe0, 0x80, 0x80, 0x00}, 3, 1, 0, 0, 0},
+ {0xe0, 0x80, 0x80, 0x00}, 3, 1, 0, 0, 0, 0},
{"wacom","Wacom Protocol IV Tablets: Pen+Mouse, relative+absolute mode",
"", M_wacom, I_wacom, STD_FLG,
- {0x80, 0x80, 0x80, 0x00}, 7, 1, 0, 0, 0},
+ {0x80, 0x80, 0x80, 0x00}, 7, 1, 0, 0, 0, 0},
{"wp", "Genius WizardPad tablet",
"wizardpad", M_wp, I_wp, STD_FLG,
- {0xFA, 0x42, 0x00, 0x00}, 10, 1, 0, 1, 0},
+ {0xFA, 0x42, 0x00, 0x00}, 10, 1, 0, 1, 0 ,0},
{"", "",
"", NULL, NULL, 0,
- {0x00, 0x00, 0x00, 0x00}, 0, 0, 0, 0, 0}
+ {0x00, 0x00, 0x00, 0x00}, 0, 0, 0, 0, 0, 0}
};
/*------------------------------------------------------------------------*/

View File

@ -0,0 +1,18 @@
--- src/lib/report-lib.c
+++ src/lib/report-lib.c
@@ -26,6 +26,7 @@
void gpm_report(int line, char *file, int stat, char *text, ... )
{
+#ifndef QUIET_LIBGPM
char *string = NULL;
va_list ap;
va_start(ap,text);
@@ -43,5 +44,7 @@
va_end(ap);
+#endif /* QUIET_LIBGPM */
+
if(stat == GPM_STAT_OOPS) exit(1); /* may a lib function call exit ???? */
}

1117
gpm-1.20.1-silitek.patch Normal file

File diff suppressed because it is too large Load Diff

158
gpm-1.20.1-syn_conf.patch Normal file
View File

@ -0,0 +1,158 @@
--- conf/gpm-syn.conf
+++ conf/gpm-syn.conf
@@ -1,49 +1,107 @@
+/* generated from src/synaptics.c, gpm-1.20.1 */
/* enabling configuration parameters */
-[edge_motion_enabled] TRUE
-[edge_motion_speed_enabled] TRUE
-[corner_taps_enabled] TRUE
-[tap_gesture_enabled] TRUE
-[pressure_speed_enabled] TRUE
-[tossing_enabled] TRUE
-[does_toss_use_static_speed] TRUE
-/* pressure induced speed related configuration parameters */
-[low_pressure] 60
-[speed_up_pressure] 60
-[pressure_factor] 0.10
-[standard_speed_factor] 0.10
-/* toss/catch related parameters */
-[min_toss_time] 100
-[max_toss_time] 300
-[prevent_toss_time] 300
-[min_toss_dist] 2
-[static_toss_speed] 70
-[toss_speed_factor] 0.5
-/* edge motion related configuration parameters */
-[edge_speed] 20
-/* corner tap actions */
-[upper_left_action] 0 (none)
-[upper_right_action] 2 (middle)
-[lower_left_action] 0 (none)
-[lower_right_action] 3 (right)
-/* wmode parameters */
-[wmode_enabled] TRUE
-[drag_lock_enabled] FALSE
-[finger_threshold] 30
-[tap_lower_limit] 5
-[tap_upper_limit] 200
-[tap_range] 100
-[tap_interval] 200
-[pads_tap_interval] 8
-[multiple_tap_delay] 30
-[palm_detect_enabled] TRUE
-[palm_detect_level] 12
-[multi_finger_tap_enable] TRUE
-[multi_finger_stop_enabled] TRUE
-[multi_finger_stop_delay] 8
- /* Additional options */
-[touch_pad_enabled] TRUE
-[stick_enabled] TRUE
-[scrolling_enabled] TRUE
-[scrolling_edge] 2
-[auto_scrolling_enabled] TRUE
-
+[edge_motion_enabled] TRUE
+[edge_motion_speed_enabled] TRUE
+[corner_taps_enabled] TRUE
+[tap_gesture_enabled] TRUE
+[pressure_speed_enabled] TRUE
+[tossing_enabled] TRUE
+[does_toss_use_static_speed] TRUE
+[tap_hold_edge_motion_enabled] TRUE
+/* pressure induced speed related configuration parameters */
+[low_pressure] 60
+[speed_up_pressure] 60
+[pressure_factor] 0.05
+[standard_speed_factor] 0.08
+/* toss/catch related parameters */
+[min_toss_time] 100
+[max_toss_time] 300
+[prevent_toss_time] 300
+[min_toss_dist] 2
+[static_toss_speed] 70
+[toss_speed_factor] 0.5
+/* edge motion related configuration parameters */
+[x_min_center] 1632
+[x_max_center] 5312
+[y_min_center] 1408
+[y_max_center] 4108
+[edge_speed] 20
+/* use wmode */
+[wmode_enabled] TRUE
+[drag_lock_enabled] TRUE
+[finger_threshold] 30
+[tap_lower_limit] 5
+[tap_upper_limit] 200
+[tap_range] 100
+[tap_interval] 200
+[multiple_tap_delay] 30
+[pads_tap_interval] 8
+/* Additional wmode parameters */
+[palm_detect_enabled] TRUE
+[palm_detect_level] 12
+[multi_finger_tap_enable] TRUE
+[multi_finger_stop_enabled] TRUE
+[multi_finger_stop_delay] 8
+[fake_finger_layer_enabled] 1
+/* Additional options*/
+/* Values for [scrolling_edge]:
+ LEFT_EDGE 0x01
+ RIGHT_EDGE 0x02
+ TOP_EDGE 0x04
+ BOTTOM_EDGE 0x08
+ UPPER_LEFT_CORNER (LEFT_EDGE | TOP_EDGE)
+ LOWER_LEFT_CORNER (LEFT_EDGE | BOTTOM_EDGE)
+ UPPER_RIGHT_CORNER (RIGHT_EDGE | TOP_EDGE)
+ LOWER_RIGHT_CORNER (RIGHT_EDGE | BOTTOM_EDGE) */
+[touchpad_enabled] TRUE
+[stick_enabled] TRUE
+[stick_pressure_enabled] FALSE
+[four_way_button_enabled] TRUE
+[four_way_button_is_mouse] TRUE
+[scrolling_enabled] TRUE
+[auto_scrolling_enabled] TRUE
+[scrolling_edge] 0x02
+[scrolling_speed] 10
+[scrolling_button_factor] 0.5
+[auto_scrolling_factor] 2.0
+/* Action id's:
+ No_Action = 0
+ Left_Button_Action = 1
+ Middle_Button_Action = 2
+ Right_Button_Action = 3
+ Fourth_Button_Action = 4
+ Up_Button_Action = 5
+ Down_Button_Action = 6
+ Turn_On_Off_Action = 7
+ Debug_On_Off_Action = 8
+ Reset_Touchpad_Action = 9
+ Toggle_Four_Way_Button_Action = 10
+ Toggle_Stick_Pressure_Action = 11
+ Toggle_Scrolling_Action = 12
+ Left_Double_Click_Action = 13
+*/
+/* corner tap actions */
+[upper_left_action] 0
+[lower_left_action] 0
+[upper_right_action] 2
+[lower_right_action] 3
+/* no. of fingers tap actions */
+[one_finger_tap_action] 1
+[two_fingers_tap_action] 3
+[three_fingers_tap_action] 2
+/* normal button actions */
+[left_button_action] 1
+[middle_button_action] 2
+[right_button_action] 3
+[fourth_button_action] 4
+[up_button_action] 5
+[down_button_action] 6
+/* 4 way button actions */
+[four_way_left_button_action] 2
+[four_way_right_button_action] 4
+[four_way_up_button_action] 5
+[four_way_down_button_action] 6
+/* Synaptic Stick (passthrugh,stick) actions */
+[stick_left_button_action] 1
+[stick_middle_button_action] 2
+[stick_right_button_action] 3

155
gpm-1.20.1-va_arg.patch Normal file
View File

@ -0,0 +1,155 @@
--- src/lib/report-lib.c
+++ src/lib/report-lib.c
@@ -41,5 +41,7 @@
vfprintf(stderr,text,ap);
fprintf(stderr,"\n");
+ va_end(ap);
+
if(stat == GPM_STAT_OOPS) exit(1); /* may a lib function call exit ???? */
}
--- src/report.c
+++ src/report.c
@@ -71,9 +71,18 @@
void gpm_report(int line, char *file, int stat, char *text, ... )
{
FILE *console = NULL;
- va_list ap;
+ va_list ap,ap2;
+#ifdef HAVE_VSYSLOG
+ va_list ap_sys;
+#endif
+ int exit_request=0; /* 0 -> return is requested
+ 1 -> exit(1) is requested
+ 2 -> _exit(1) is requested */
va_start(ap,text);
+#ifdef HAVE_VSYSLOG
+ va_copy(ap_sys,ap);
+#endif
switch(option.run_status) {
/******************** STARTUP *****************/
@@ -82,7 +91,7 @@
case GPM_STAT_INFO:
#ifdef HAVE_VSYSLOG
syslog(LOG_INFO | LOG_USER, GPM_STRING_INFO);
- vsyslog(LOG_INFO | LOG_USER, text, ap);
+ vsyslog(LOG_INFO | LOG_USER, text, ap_sys);
#endif
fprintf(stderr,GPM_STRING_INFO);
vfprintf(stderr,text,ap);
@@ -92,7 +101,7 @@
case GPM_STAT_WARN:
#ifdef HAVE_VSYSLOG
syslog(LOG_DAEMON | LOG_WARNING, GPM_STRING_WARN);
- vsyslog(LOG_DAEMON | LOG_WARNING, text, ap);
+ vsyslog(LOG_DAEMON | LOG_WARNING, text, ap_sys);
#endif
fprintf(stderr,GPM_STRING_WARN);
vfprintf(stderr,text,ap);
@@ -102,7 +111,7 @@
case GPM_STAT_ERR:
#ifdef HAVE_VSYSLOG
syslog(LOG_DAEMON | LOG_ERR, GPM_STRING_ERR);
- vsyslog(LOG_DAEMON | LOG_ERR, text, ap);
+ vsyslog(LOG_DAEMON | LOG_ERR, text, ap_sys);
#endif
fprintf(stderr,GPM_STRING_ERR);
vfprintf(stderr,text,ap);
@@ -112,13 +121,13 @@
case GPM_STAT_OOPS:
#ifdef HAVE_VSYSLOG
syslog(LOG_DAEMON | LOG_ERR, GPM_STRING_OOPS);
- vsyslog(LOG_DAEMON | LOG_ERR, text, ap);
+ vsyslog(LOG_DAEMON | LOG_ERR, text, ap_sys);
#endif
fprintf(stderr,GPM_STRING_OOPS);
vfprintf(stderr,text,ap);
fprintf(stderr,"\n");
- exit(1); /* we should have a oops()-function,but this works,too*/
+ exit_request=1; /* we should have a oops()-function,but this works,too*/
break;
}
break; /* startup sequence */
@@ -129,14 +138,14 @@
case GPM_STAT_INFO:
#ifdef HAVE_VSYSLOG
syslog(LOG_INFO | LOG_USER, GPM_STRING_INFO);
- vsyslog(LOG_INFO | LOG_USER, text, ap);
+ vsyslog(LOG_INFO | LOG_USER, text, ap_sys);
#endif
break;
case GPM_STAT_WARN:
#ifdef HAVE_VSYSLOG
syslog(LOG_DAEMON | LOG_WARNING, GPM_STRING_WARN);
- vsyslog(LOG_DAEMON | LOG_WARNING, text, ap);
+ vsyslog(LOG_DAEMON | LOG_WARNING, text, ap_sys);
#endif
if((console = fopen(GPM_SYS_CONSOLE,"a")) != NULL) {
fprintf(console,GPM_STRING_WARN);
@@ -149,8 +158,9 @@
case GPM_STAT_ERR:
#ifdef HAVE_VSYSLOG
syslog(LOG_DAEMON | LOG_ERR, GPM_STRING_ERR);
- vsyslog(LOG_DAEMON | LOG_ERR, text, ap);
+ vsyslog(LOG_DAEMON | LOG_ERR, text, ap_sys);
#endif
+ va_copy(ap2,ap);
if((console = fopen(GPM_SYS_CONSOLE,"a")) != NULL) {
fprintf(console,GPM_STRING_ERR);
vfprintf(console,text,ap);
@@ -160,22 +170,24 @@
if((console = fopen(option.consolename,"a")) != NULL) {
fprintf(console,GPM_STRING_ERR);
- vfprintf(console,text,ap);
+ vfprintf(console,text,ap2);
fprintf(console,"\n");
fclose(console);
}
+
+ va_end(ap2);
break;
case GPM_STAT_OOPS:
#ifdef HAVE_VSYSLOG
syslog(LOG_DAEMON | LOG_ERR, GPM_STRING_OOPS);
- vsyslog(LOG_DAEMON | LOG_ERR, text, ap);
+ vsyslog(LOG_DAEMON | LOG_ERR, text, ap_sys);
#endif
fprintf(stderr,GPM_STRING_OOPS);
vfprintf(stderr,text,ap);
fprintf(stderr,"\n");
- _exit(1); /* we are the fork()-child */
+ exit_request=2; /* we are the fork()-child */
break;
}
break; /* running gpm */
@@ -203,10 +215,21 @@
vfprintf(console,text,ap);
fprintf(console,"\n");
- if(stat == GPM_STAT_OOPS) exit(1);
-
+ if(stat == GPM_STAT_OOPS) exit_request=1;
+
break;
} /* switch for current modus */
+
+ va_end(ap);
+#ifdef HAVE_VSYSLOG
+ va_end(ap_sys);
+#endif
+
+ if (exit_request == 2)
+ _exit(1);
+ if (exit_request == 1)
+ exit(1);
+ return;
} /* gpm_report */

113
gpm-1.20.1.patch Normal file
View File

@ -0,0 +1,113 @@
--- Makefile.in
+++ Makefile.in
@@ -50,9 +50,13 @@
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) $(STRIP)' install
installdirs:
- $(MKDIR) $(libdir) $(bindir) $(sbindir) $(includedir) $(sysconfdir); \
+ $(INSTALL_DIR) $(DESTDIR)$(libdir)
+ $(INSTALL_DIR) $(DESTDIR)$(bindir)
+ $(INSTALL_DIR) $(DESTDIR)$(sbindir)
+ $(INSTALL_DIR) $(DESTDIR)$(includedir)
+ $(INSTALL_DIR) $(DESTDIR)$(sysconfdir); \
if test "x@ELISP@" != "x" ; then \
- $(MKDIR) $(lispdir) ; \
+ $(INSTALL_DIR) $(DESTDIR)$(lispdir) ; \
fi
### GENERIC
--- Makefile.include.in
+++ Makefile.include.in
@@ -37,6 +37,7 @@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
+INSTALL_DIR = @INSTALL@ -d
LN_S = @LN_S@
EMACS = @EMACS@
ELISP = @ELISP@
--- doc/Makefile.in
+++ doc/Makefile.in
@@ -112,29 +112,18 @@
# install & uninstall
installdirs:
- $(MKDIR) $(man1dir) $(man7dir) $(man8dir) $(infodir)
+ $(INSTALL_DIR) $(DESTDIR)$(man1dir)
+ $(INSTALL_DIR) $(DESTDIR)$(man7dir)
+ $(INSTALL_DIR) $(DESTDIR)$(man8dir)
+ $(INSTALL_DIR) $(DESTDIR)$(infodir)
install: all installdirs
- $(INSTALL_DATA) -m 644 mev.1 $(man1dir)
- $(INSTALL_DATA) -m 644 mouse-test.1 $(man1dir)
- $(INSTALL_DATA) -m 644 gpm-root.1 $(man1dir)
- $(INSTALL_DATA) -m 644 gpm-types.7 $(man7dir)
- $(INSTALL_DATA) -m 644 gpm.8 $(man8dir)
- $(INSTALL_DATA) -m 644 $(srcdir)/gpm.info $(infodir)
- # Use install-info if available
- -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
- if [ -f $(infodir)/dir ] ; then \
- install-info --dir-file=$(infodir)/dir $(infodir)/gpm.info; \
- fi; \
- fi
- #itz Sat Dec 26 23:21:05 PST 1998
- #i keep all my infopages compressed and i'm tired to do it by
- #hand, so check if there are any compressed pages and do this
- #one too
- -ls $(infodir)/*[-.]info.gz >/dev/null 2>&1 \
- && gzip -f $(infodir)/gpm.info
- # Hmm.... shouldn't man pages be compressed too?
- # maybe they should, but at least at my system they are not.
+ $(INSTALL_DATA) -m 644 mev.1 $(DESTDIR)$(man1dir)
+ $(INSTALL_DATA) -m 644 mouse-test.1 $(DESTDIR)$(man1dir)
+ $(INSTALL_DATA) -m 644 gpm-root.1 $(DESTDIR)$(man1dir)
+ $(INSTALL_DATA) -m 644 gpm-types.7 $(DESTDIR)$(man7dir)
+ $(INSTALL_DATA) -m 644 gpm.8 $(DESTDIR)$(man8dir)
+ $(INSTALL_DATA) -m 644 $(srcdir)/gpm.info $(DESTDIR)$(infodir)
# This potentially leaves around cached manpages,
# e.g. /var/cache/man/cat1/mev.1.gz. Deleting these is not our job,
--- src/Makefile.in
+++ src/Makefile.in
@@ -91,15 +91,15 @@
installdirs:
install: check
- $(INSTALL_PROGRAM) gpm $(sbindir)/gpm
- $(INSTALL_DATA) -m 644 lib/libgpm.a $(libdir)/libgpm.a
- $(INSTALL_DATA) -m 644 $(srcdir)/headers/gpm.h $(includedir)/gpm.h
+ $(INSTALL_PROGRAM) gpm $(DESTDIR)$(sbindir)/gpm
+ $(INSTALL_DATA) -m 644 lib/libgpm.a $(DESTDIR)$(libdir)/libgpm.a
+ $(INSTALL_DATA) -m 644 $(srcdir)/headers/gpm.h $(DESTDIR)$(includedir)/gpm.h
# POSIX requires the range of a for loop be nonempty and Bash
# 2.x goes along; unfortunately that means an additional
# headache in cases like this
if test "x@SHLIB@" != "x" ; then \
- $(INSTALL_DATA) -m 644 lib/libgpm.so.@abi_full@ $(libdir)/libgpm.so.@abi_full@ ;\
- cd $(libdir) && $(LN_S) -f libgpm.so.@abi_full@ libgpm.so ;\
+ $(INSTALL_DATA) -m 755 lib/libgpm.so.@abi_full@ $(DESTDIR)$(libdir)/libgpm.so.@abi_full@ ;\
+ cd $(DESTDIR)$(libdir) && $(LN_S) -f libgpm.so.@abi_full@ libgpm.so ;\
echo "WARNING: We installed a lib, you should now call ldconfig" ; \
echo "f.i.: ldconfig -n -l $(libdir)/libgpm.so.@abi_full@" ;\
echo "Or to update everything just type ldconfig"; \
@@ -107,7 +107,7 @@
# prog/
for i in $(PROG); do \
- $(INSTALL_PROGRAM) $$i $(bindir)/`echo $$i | sed 's,prog/,,'` ;\
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir)/`echo $$i | sed 's,prog/,,'` ;\
done
install-strip:
--- src/special.c
+++ src/special.c
@@ -155,7 +155,7 @@
open(GPM_NULL_DEV,O_RDONLY); /* stdin */
open(option.consolename,O_WRONLY); /* stdout */
dup(1); /* stderr */
- for (i=3;i<OPEN_MAX; i++) close(i);
+ for (i=3;i<getdtablesize(); i++) close(i);
execl("/bin/sh","sh","-c",command,(char *)NULL);
exit(1); /* shouldn't happen */

3
gpm-1.20.1.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:11fabe7f27a205ff1ea6aee23e1dc2bb2dc5dbfc45ff0320fca0cd559806a936
size 565014

490
gpm.changes Normal file
View File

@ -0,0 +1,490 @@
-------------------------------------------------------------------
Thu Feb 16 14:23:52 CET 2006 - mmarek@suse.cz
- merge rcgpm-error-messages.diff into rcgpm
- hint users to run 'yast mouse' to configure gpm
[#114919 and duplicates]
-------------------------------------------------------------------
Wed Jan 25 21:30:21 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Thu Nov 3 14:15:59 CET 2005 - mmarek@suse.cz
- fix apparent typo in gunze touchscreen driver [#132053]
-------------------------------------------------------------------
Tue Aug 23 17:54:03 CEST 2005 - pmladek@suse.cz
- fixed the init script to print error messages if there are any
problems with configuration [#106700]
-------------------------------------------------------------------
Sat Apr 9 17:18:33 CEST 2005 - aj@suse.de
- Fix build also on i386 with GCC 4.
-------------------------------------------------------------------
Sat Mar 26 23:48:12 CET 2005 - aj@suse.de
- Fix build with GCC 4.
-------------------------------------------------------------------
Thu Mar 24 16:10:02 CET 2005 - uli@suse.de
- fixed to build on ARM
-------------------------------------------------------------------
Wed Nov 10 11:50:47 CET 2004 - ro@suse.de
- fixed file list
-------------------------------------------------------------------
Fri Mar 05 17:32:00 CET 2004 - mcihar@suse.cz
- fix possible segfault in Gpm_Open (bug #31970)
-------------------------------------------------------------------
Fri Oct 17 17:41:03 CEST 2003 - mcihar@suse.cz
- do not build as root
-------------------------------------------------------------------
Mon Sep 15 09:14:47 CEST 2003 - mcihar@suse.cz
- allow to set gpm repeating in sysconfig (GPM_REPEAT)
-------------------------------------------------------------------
Thu Aug 14 15:53:27 CEST 2003 - mcihar@suse.cz
- added activation metadata to sysconfig template (bug #28903)
-------------------------------------------------------------------
Fri Jun 20 02:26:09 CEST 2003 - ro@suse.de
- added directories to filelist
-------------------------------------------------------------------
Thu Apr 24 14:52:03 CEST 2003 - ro@suse.de
- merged postuns
-------------------------------------------------------------------
Thu Apr 24 12:20:23 CEST 2003 - ro@suse.de
- fix install_info --delete call and move from preun to postun
-------------------------------------------------------------------
Fri Mar 14 19:41:59 CET 2003 - pmladek@suse.cz
- redirected stdin, stdout and stderr to /dev/null in the daemon mode [#25386]
-------------------------------------------------------------------
Tue Mar 04 19:18:59 CET 2003 - pmladek@suse.cz
- fixed Gpm_Open to initialize option.consolename only for the first time
(Gpm_Open.patch) [#24587]
-------------------------------------------------------------------
Mon Feb 17 17:33:43 CET 2003 - mmj@suse.de
- Use %install_info macros [#23421]
-------------------------------------------------------------------
Thu Jan 09 12:22:56 CET 2003 - pmladek@suse.cz
- updated to the stable version 1.20.1:
* synaptics ps2 touchpad support
* code cleanup in various main files
* prototype of mouse support for n-mice. expect final in 1.20.3.
- removed the obsolete compat patch which fixed compactibility with an older
libgpm.so.1
- removed the obsolete synaptic patch which fixed synaptics.c to read
/etc/gpm/syn.conf with TABs
- removed the obsolete old_pid_file patch which fixed the start of gpm server
when an old invalid /var/run/gpm.pid exists
- removed the prototype of mouse support for n-mice, because it does not work
for the present and it is uncomplete, it requires to define the mouse device
before the mouse type on the command line, but the option -M is still needed,
so this feature is not complete and can confuse the user
(no_templates_for_new_multiple_mode.patch)
- fixed the default gpm/syn.conf according to the new synaptics.c
- fixed to link with "-lm" if needed (ceil is not an inline function)
and where needed (gpm, libgpm.so)
-------------------------------------------------------------------
Thu Jan 02 11:31:30 CET 2003 - pmladek@suse.cz
- added metadata to the sysconfig template [#22660]
- got rid of the variable GPM_PROTOCOL from the init script and the
sysconfig template, used MOUSETYPE instead (both variables were generated
by YaST in SuLi 8.2, which is confusing and the variable MOUSETYPE
better conforms with other variable names MOUSEDEVICE and XMOUSETYPE)
-------------------------------------------------------------------
Wed Sep 18 01:45:15 CEST 2002 - ro@suse.de
- removed bogus self-provides
-------------------------------------------------------------------
Mon Sep 2 08:47:50 CEST 2002 - kukuk@suse.de
- Remove unused yacc from neededforbuild
- Move rcgpm symlink to the same location as the binary is
- Remove not existent services from init script header
-------------------------------------------------------------------
Tue Aug 13 09:55:56 MEST 2002 - pmladek@suse.cz
- already enabled __os_install_post macro
-------------------------------------------------------------------
Mon Aug 12 19:33:06 MEST 2002 - pmladek@suse.de
- fixed problem with variable argument lists [#17528]
- removed patch which fixes messages, they are completely disabled
in libgpm now, generally, no library should write messages on
standart output or standart error output (it made problems
with w3m for example)
-------------------------------------------------------------------
Tue Jul 30 23:32:16 CEST 2002 - ro@suse.de
- also rename MOUSE to MOUSEDEVICE on update
- added PreReqs
-------------------------------------------------------------------
Tue Jul 30 17:26:03 MEST 2002 - pmladek@suse.cz
- used the MOUSEDEVICE variable instead of the MOUSE variable [#17266]
- the MOUSEDEVICE variable is filled up into /etc/sysconfig/mouse
by this package now [#17266]
-------------------------------------------------------------------
Thu Jul 25 11:15:51 CEST 2002 - pmladek@suse.cz
- fixed compactibility with older libgpm.so.1
- fixed gpm messages:
* added prefix "gpm: "
* disabled debug messages in libgpm
* improved message in function Gpm_Open when gpm server
is not running
-------------------------------------------------------------------
Thu Jul 11 16:03:12 CEST 2002 - pmladek@suse.cz
- added Silitek mouse drivers created by Dr. Werner Fink <werner@suse.de>
- gpm config files changes:
* installed gpm-twiddler.conf, many thanks to Dr. Werner Fink for hint
* fixed and installed gpm-syn.conf
* moved all gpm config files from /etc to /etc/gpm
* removed prefix "gpm-" from gpm config file names
* created README.SuSE
* improved "probe" part in init script to check changes
in config files from /etc/gpm/*
- fixed synaptics.c to read /etc/gpm/syn.conf with TABs
- fixed support for reconnection for PS/2 mouses to save necessary values
in struct mouse_features (to work correctly with dual-mouse stuff)
-------------------------------------------------------------------
Wed Jul 10 17:05:00 CEST 2002 - pmladek@suse.cz
- updated to version 1.20.1rc1:
* synaptics ps2 touchpad support
* removed compile problems
* objdir/ support without problems
* cleaned up internal message functions
* clean {g,m,}awk support
* clean ps2 initialization (allows using ps2 mouse after you
used synps!)
* gpm clients can't cause gpm do die.
- removed obsolete patch for gpm-root.y
- removed obsolete ia64 patch
- removed obsolete Werner's patch for devfs.c
- improved patch for reconnection of PS/2 mouses
- fixed start of gpm server when an old invalid /var/run/gpm.pid exists
- reorganized patches
- used %run_ldconfig macro in %post and %postun sections
- fixed init script according to skeleton
-------------------------------------------------------------------
Tue Jul 9 11:43:38 CEST 2002 - werner@suse.de
- Bug fix in devfs.c for twid and other keyboards
- Bug fix in gpm.c: Some PS/2 devices really wants be readed
byte by byte
- Complete the PS/2 command bytes in headers/defines.h
-------------------------------------------------------------------
Fri Mar 15 17:19:12 CET 2002 - kukuk@suse.de
- fix typo in sysconfig.gpm [Bug #15034]
-------------------------------------------------------------------
Thu Jan 17 19:06:13 CET 2002 - pmladek@suse.cz
- added variable GPM_PROTOCOL to /etc/sysconfig/mouse
- if the variable GPM_PARAM is empty then gpm will start with option
"-t $GPM_PROTOCOL -m $MOUSE" now
-------------------------------------------------------------------
Wed Jan 16 18:40:46 CET 2002 - ro@suse.de
- removed setup.selection
-------------------------------------------------------------------
Fri Jan 11 18:39:17 CET 2002 - pmladek@suse.cz
- used macro %{_libdir} to fix for lib64
- fixed rights of static library to 644
- fixed documentation in /usr/share/doc/packages/gpm
-------------------------------------------------------------------
Tue Jan 8 20:30:05 CET 2002 - egmont@suselinux.hu
- removed colons from init script messages
-------------------------------------------------------------------
Tue Jan 8 17:34:20 CET 2002 - ro@suse.de
- moved GPM_PARAM to /etc/sysconfig/mouse
-------------------------------------------------------------------
Mon Dec 10 18:03:26 CET 2001 - pmladek@suse.cz
- updated to version 1.19.6:
* Synaptics 4 Button Touchpad support
* IntelliMouse Explorer support
* some bug fixes
- removed obsolete mktemp security patch
-------------------------------------------------------------------
Wed Dec 5 02:18:19 CET 2001 - ro@suse.de
- add "-p" to macro call to deactivate perl-hack
-------------------------------------------------------------------
Wed Dec 5 01:51:46 CET 2001 - ro@suse.de
- use fillup_and_insserv and removed START_GPM
- move variable GPM_PARAM to this package
-------------------------------------------------------------------
Thu Oct 18 15:37:02 CEST 2001 - pmladek@suse.cz
- fixed permissions of /dev/gpmctl back to 777, thus the
applications (mc) can use mouse support for normal user (#11893)
-------------------------------------------------------------------
Mon Sep 17 12:08:03 CEST 2001 - pmladek@suse.cz
- fixed to detect tokens AA 00 only in protocols
for ps/2 mouses
-------------------------------------------------------------------
Mon Sep 10 17:46:51 CEST 2001 - pmladek@suse.cz
- fixed to read only two bytes when mouse is
reconected and it sends tokens AA 00
-------------------------------------------------------------------
Fri Sep 7 11:44:56 CEST 2001 - pmladek@suse.cz
- fixed detection of reconnection of ps2 mouses and friends
with kernel 2.4.9 or higher (bug #9822)
* I take inspiration in patch from
George Staikos (staikos@0wned.org)
-------------------------------------------------------------------
Thu Aug 23 10:30:51 CEST 2001 - pmladek@suse.cz
- updated to version 1.19.3:
* security fixes:
* close the newly accept()ed socket in case of
identification failure
* removed initial setuid(0) call
* added initgroups()
* many bugfixes
* features:
* re-check console size on console change
* changed use of -o option
- removed obsolete security patches
- removed obsolete resize patch
- applied two patches from RedHat:
* fix permissions on /dev/gpmctl
* call initgroups in gpm-root before spawning command as user
* make gpm-root work on big endian
-------------------------------------------------------------------
Mon Aug 6 15:59:55 CEST 2001 - kukuk@suse.de
- Fix comment about init script location [Bug #9494]
-------------------------------------------------------------------
Thu Jun 14 16:46:45 CEST 2001 - pmladek@suse.cz
- fixed link libgpm.so.1
-------------------------------------------------------------------
Fri Jun 8 12:26:36 CEST 2001 - kukuk@suse.de
- Use _libdir macros
-------------------------------------------------------------------
Fri Jun 8 11:14:55 CEST 2001 - pmladek@suse.cz
- fixed to compile on sparc64 (libraries in /usr/lib64 now)
- fixed BUILD_ROOT
-------------------------------------------------------------------
Wed May 16 15:15:24 CEST 2001 - pmladek@suse.cz
- fixed cast warnings on ia64
-------------------------------------------------------------------
Mon Apr 23 07:51:16 CEST 2001 - pmladek@suse.cz
- fixed warnings on ia64
-------------------------------------------------------------------
Thu Apr 12 05:33:05 CEST 2001 - pmladek@suse.cz
- fixed init script by new skeleton
- fixed to compile
- removed include $(DEPS) from makefile
-------------------------------------------------------------------
Mon Jan 15 10:06:52 CET 2001 - nadvornik@suse.cz
- added Required-Start: $remote_fs $syslog [bug #5580]
-------------------------------------------------------------------
Tue Jan 2 00:02:38 CET 2001 - olh@suse.de
- add script name to %postin
-------------------------------------------------------------------
Wed Dec 20 16:12:48 MET 2000 - pthomas@suse.de
- Fix bug in Gpm_Wgetch
-------------------------------------------------------------------
Tue Nov 28 18:31:00 CET 2000 - ro@suse.de
- sbin/init.d -> etc/init.d
-------------------------------------------------------------------
Wed Nov 22 10:58:21 CET 2000 - nadvornik@suse.cz
- removed runlevel links
- fixed init script
-------------------------------------------------------------------
Mon Oct 9 09:00:19 CEST 2000 - nadvornik@suse.cz
- fixed Copyright
- used bzip2
-------------------------------------------------------------------
Fri Oct 6 09:46:00 CEST 2000 - schwab@suse.de
- Use getdtablesize() instead of OPEN_MAX.
-------------------------------------------------------------------
Mon Jul 17 09:33:58 CEST 2000 - nadvornik@suse.cz
- added security patch for disable-paste. Now it don't
need to be installed with suid root.
-------------------------------------------------------------------
Thu Apr 27 08:58:34 CEST 2000 - nadvornik@suse.cz
- added initgroups() patch
- used --sysconfdir=/etc
-------------------------------------------------------------------
Tue Apr 18 09:56:08 CEST 2000 - nadvornik@suse.cz
- added BuildRoot
-------------------------------------------------------------------
Mon Apr 3 15:12:32 MEST 2000 - uli@suse.de
- merged in gpm-root fix by Alessandro Rubini
-------------------------------------------------------------------
Fri Feb 25 15:38:57 CET 2000 - kukuk@suse.de
- Move /usr/{info,man} -> /usr/share/{info,man}
-------------------------------------------------------------------
Mon Jan 31 13:46:24 MET 2000 - uli@suse.de
- added fix for possible /tmp race attacks by thomas@suse.de
-------------------------------------------------------------------
Fri Dec 17 00:52:15 CET 1999 - ro@suse.de
- removed params for ldconfig (-l does not work any more)
- update to 1.18.1
- got rid of Makefile.Linux
- use RPM_OPT_FLAGS for configure
-------------------------------------------------------------------
Mon Oct 11 12:35:02 MEST 1999 - uli@suse.de
- update -> 1.18.0
-------------------------------------------------------------------
Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
-------------------------------------------------------------------
Tue Mar 16 18:15:37 MET 1999 - ro@suse.de
- fixed rc-script: check if gpm already running
-------------------------------------------------------------------
Fri Mar 5 17:48:03 MET 1999 - ro@suse.de
- fixed rc script
-------------------------------------------------------------------
Tue Mar 2 18:31:19 MET 1999 - ro@suse.de
- update to 1.17.5
-------------------------------------------------------------------
Mon Dec 7 11:48:57 MET 1998 - ro@suse.de
- updated init-script
- added rcgpm symlink
----------------------------------------------------------------------------
Fri Oct 24 15:06:18 MEST 1997 - florian@suse.de
- update to gpm 1.13
----------------------------------------------------------------------------
Sun May 4 15:23:41 CEST 1997 - bs@suse.de
- added /var/adm/setup/setup.selection
----------------------------------------------------------------------------
Wed Apr 30 15:57:14 CEST 1997 - florian@suse.de
- update to version 1.12
----------------------------------------------------------------------------
Wed Nov 6 00:13:26 CET 1996 - florian@suse.de
- move startup scripts from aaa_base to gpm.tgz

422
gpm.spec Normal file
View File

@ -0,0 +1,422 @@
#
# spec file for package gpm (Version 1.20.1)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: gpm
URL: http://linux.schottelius.org/gpm/
License: GPL
Group: System/Console
Provides: select
PreReq: /bin/sed %insserv_prereq %fillup_prereq
Autoreqprov: on
Version: 1.20.1
Release: 312
Summary: Console Mouse Support
Source0: http://arcana.linux.it/pub/gpm/gpm-%{version}.tar.bz2
Source1: rcgpm
Source2: sysconfig.mouse-%{name}
Source3: README.SuSE
Patch0: gpm-%{version}.patch
Patch1: gpm-%{version}-ps2_command_bytes.patch
Patch2: gpm-%{version}-ps2_read.patch
Patch3: gpm-%{version}-ps2_reconnection.patch
Patch4: gpm-%{version}-syn_conf.patch
Patch5: gpm-%{version}-silitek.patch
Patch6: gpm-%{version}-conf.patch
Patch7: gpm-%{version}-va_arg.patch
Patch8: gpm-%{version}-quiet_libgpm.patch
Patch9: gpm-%{version}-no_templates_for_new_multiple_mode.patch
Patch10: gpm-%{version}-ceil.patch
Patch11: gpm-%{version}-Gpm_Open.patch
Patch12: gpm-%{version}-daemon_mode.patch
Patch13: gpm-%{version}-gunze-overflow.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %install_info_prereq
%description
The gpm (general purpose mouse) daemon tries to be a useful mouse
server for applications running on the Linux console. It can be used by
mc (Midnight Commander) or by w3m, the text-based Web browser. It
provides console cut and paste operations.
Authors:
--------
Alessandro Rubini <rubini@ipvvis.unipv.it>
Nico Schottelius <nico@schottelius.net>
%prep
%setup -q
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
%patch11
%patch12
%patch13
#
cp %{S:1} %{S:2} %{S:3} .
%build
aclocal
autoconf
CFLAGS="$RPM_OPT_FLAGS -DQUIET_LIBGPM" \
./configure --prefix=%{_prefix} \
--libdir=%{_libdir} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--sysconfdir=/etc/gpm
%ifarch %arm
make CC="gcc -lm"
%endif
make
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
#
# gpm confings
for file in conf/gpm-* ; do
install -m 644 $file $RPM_BUILD_ROOT/etc/${file/conf\/gpm-/gpm\/}
done
#
# lisp
install -d $RPM_BUILD_ROOT/usr/share/emacs/site-lisp
install contrib/emacs/t-mouse.el* $RPM_BUILD_ROOT/usr/share/emacs/site-lisp
#
# start script
install -m 755 -d $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 755 -d $RPM_BUILD_ROOT/etc/init.d
install -m 755 -d $RPM_BUILD_ROOT/usr/sbin
install -m 644 sysconfig.mouse-%{name} $RPM_BUILD_ROOT/var/adm/fillup-templates
install -m 755 rcgpm $RPM_BUILD_ROOT/etc/init.d/gpm
ln -sf ../../etc/init.d/gpm $RPM_BUILD_ROOT/usr/sbin/rcgpm
%post
# rename variable in all possible locations for update
for i in etc/rc.config etc/sysconfig/mouse ; do
if test -f $i ; then
sed -e "s@^MOUSE=@MOUSEDEVICE=@" $i > $i.t && mv $i.t $i
rm -f $i.t
fi
done
# there were two variables with the same value GPM_PROTOCOL and MOUSETYPE
# in SuLi 8.2. The MOUSETYPE variable better conforms with with other
# variable names MOUSEDEVICE and XMOUSETYPE name scheme, so get rid of
# the obsolete GPM_PROTOCOL variable
if grep "^GPM_PROTOCOL=" /etc/sysconfig/mouse 1>/dev/null 2>/dev/null ; then
if grep "^MOUSETYPE=" /etc/sysconfig/mouse 1>/dev/null 2>/dev/null ; then
# comment out the obsolete MOUSETYPE variable
perl -pi -e "s|^(MOUSETYPE=.*)$|\#\$1 \# the variable GPM_PROTOCOL was renamed to MOUSETYPE|" /etc/sysconfig/mouse
fi
# rename GPM_PROTOCOL to MOUSETYPE
perl -pi -e "s|^GPM_PROTOCOL=(.*)$|\# the variable GPM_PROTOCOL was renamed to MOUSETYPE\nMOUSETYPE=\$1|" /etc/sysconfig/mouse
fi
%{fillup_and_insserv -p gpm}
%{fillup_only -an mouse }
%{run_ldconfig}
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%{insserv_cleanup}
%{run_ldconfig}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc BUGS COPYING Changes README README.SuSE TODO
%doc doc/Announce doc/FAQ doc/README*
%doc %{_infodir}/*
%doc %{_mandir}/*/*
%dir /etc/gpm/
%config /etc/gpm/*
%config /etc/init.d/gpm
/usr/bin/*
/usr/sbin/*
/usr/include/*
%{_libdir}/lib*
%dir /usr/share/emacs
%dir /usr/share/emacs/site-lisp
/usr/share/emacs/site-lisp/*
/var/adm/fillup-templates/*
%changelog -n gpm
* Thu Feb 16 2006 - mmarek@suse.cz
- merge rcgpm-error-messages.diff into rcgpm
- hint users to run 'yast mouse' to configure gpm
[#114919 and duplicates]
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Thu Nov 03 2005 - mmarek@suse.cz
- fix apparent typo in gunze touchscreen driver [#132053]
* Tue Aug 23 2005 - pmladek@suse.cz
- fixed the init script to print error messages if there are any
problems with configuration [#106700]
* Sat Apr 09 2005 - aj@suse.de
- Fix build also on i386 with GCC 4.
* Sat Mar 26 2005 - aj@suse.de
- Fix build with GCC 4.
* Thu Mar 24 2005 - uli@suse.de
- fixed to build on ARM
* Wed Nov 10 2004 - ro@suse.de
- fixed file list
* Fri Mar 05 2004 - mcihar@suse.cz
- fix possible segfault in Gpm_Open (bug #31970)
* Fri Oct 17 2003 - mcihar@suse.cz
- do not build as root
* Mon Sep 15 2003 - mcihar@suse.cz
- allow to set gpm repeating in sysconfig (GPM_REPEAT)
* Thu Aug 14 2003 - mcihar@suse.cz
- added activation metadata to sysconfig template (bug #28903)
* Fri Jun 20 2003 - ro@suse.de
- added directories to filelist
* Thu Apr 24 2003 - ro@suse.de
- merged postuns
* Thu Apr 24 2003 - ro@suse.de
- fix install_info --delete call and move from preun to postun
* Fri Mar 14 2003 - pmladek@suse.cz
- redirected stdin, stdout and stderr to /dev/null in the daemon mode [#25386]
* Tue Mar 04 2003 - pmladek@suse.cz
- fixed Gpm_Open to initialize option.consolename only for the first time
(Gpm_Open.patch) [#24587]
* Mon Feb 17 2003 - mmj@suse.de
- Use %%install_info macros [#23421]
* Thu Jan 09 2003 - pmladek@suse.cz
- updated to the stable version 1.20.1:
* synaptics ps2 touchpad support
* code cleanup in various main files
* prototype of mouse support for n-mice. expect final in 1.20.3.
- removed the obsolete compat patch which fixed compactibility with an older
libgpm.so.1
- removed the obsolete synaptic patch which fixed synaptics.c to read
/etc/gpm/syn.conf with TABs
- removed the obsolete old_pid_file patch which fixed the start of gpm server
when an old invalid /var/run/gpm.pid exists
- removed the prototype of mouse support for n-mice, because it does not work
for the present and it is uncomplete, it requires to define the mouse device
before the mouse type on the command line, but the option -M is still needed,
so this feature is not complete and can confuse the user
(no_templates_for_new_multiple_mode.patch)
- fixed the default gpm/syn.conf according to the new synaptics.c
- fixed to link with "-lm" if needed (ceil is not an inline function)
and where needed (gpm, libgpm.so)
* Thu Jan 02 2003 - pmladek@suse.cz
- added metadata to the sysconfig template [#22660]
- got rid of the variable GPM_PROTOCOL from the init script and the
sysconfig template, used MOUSETYPE instead (both variables were generated
by YaST in SuLi 8.2, which is confusing and the variable MOUSETYPE
better conforms with other variable names MOUSEDEVICE and XMOUSETYPE)
* Wed Sep 18 2002 - ro@suse.de
- removed bogus self-provides
* Mon Sep 02 2002 - kukuk@suse.de
- Remove unused yacc from neededforbuild
- Move rcgpm symlink to the same location as the binary is
- Remove not existent services from init script header
* Tue Aug 13 2002 - pmladek@suse.cz
- already enabled __os_install_post macro
* Mon Aug 12 2002 - pmladek@suse.de
- fixed problem with variable argument lists [#17528]
- removed patch which fixes messages, they are completely disabled
in libgpm now, generally, no library should write messages on
standart output or standart error output (it made problems
with w3m for example)
* Tue Jul 30 2002 - ro@suse.de
- also rename MOUSE to MOUSEDEVICE on update
- added PreReqs
* Tue Jul 30 2002 - pmladek@suse.cz
- used the MOUSEDEVICE variable instead of the MOUSE variable [#17266]
- the MOUSEDEVICE variable is filled up into /etc/sysconfig/mouse
by this package now [#17266]
* Thu Jul 25 2002 - pmladek@suse.cz
- fixed compactibility with older libgpm.so.1
- fixed gpm messages:
* added prefix "gpm: "
* disabled debug messages in libgpm
* improved message in function Gpm_Open when gpm server
is not running
* Thu Jul 11 2002 - pmladek@suse.cz
- added Silitek mouse drivers created by Dr. Werner Fink <werner@suse.de>
- gpm config files changes:
* installed gpm-twiddler.conf, many thanks to Dr. Werner Fink for hint
* fixed and installed gpm-syn.conf
* moved all gpm config files from /etc to /etc/gpm
* removed prefix "gpm-" from gpm config file names
* created README.SuSE
* improved "probe" part in init script to check changes
in config files from /etc/gpm/*
- fixed synaptics.c to read /etc/gpm/syn.conf with TABs
- fixed support for reconnection for PS/2 mouses to save necessary values
in struct mouse_features (to work correctly with dual-mouse stuff)
* Wed Jul 10 2002 - pmladek@suse.cz
- updated to version 1.20.1rc1:
* synaptics ps2 touchpad support
* removed compile problems
* objdir/ support without problems
* cleaned up internal message functions
* clean {g,m,}awk support
* clean ps2 initialization (allows using ps2 mouse after you
used synps!)
* gpm clients can't cause gpm do die.
- removed obsolete patch for gpm-root.y
- removed obsolete ia64 patch
- removed obsolete Werner's patch for devfs.c
- improved patch for reconnection of PS/2 mouses
- fixed start of gpm server when an old invalid /var/run/gpm.pid exists
- reorganized patches
- used %%run_ldconfig macro in %%post and %%postun sections
- fixed init script according to skeleton
* Tue Jul 09 2002 - werner@suse.de
- Bug fix in devfs.c for twid and other keyboards
- Bug fix in gpm.c: Some PS/2 devices really wants be readed
byte by byte
- Complete the PS/2 command bytes in headers/defines.h
* Fri Mar 15 2002 - kukuk@suse.de
- fix typo in sysconfig.gpm [Bug #15034]
* Thu Jan 17 2002 - pmladek@suse.cz
- added variable GPM_PROTOCOL to /etc/sysconfig/mouse
- if the variable GPM_PARAM is empty then gpm will start with option
"-t $GPM_PROTOCOL -m $MOUSE" now
* Wed Jan 16 2002 - ro@suse.de
- removed setup.selection
* Fri Jan 11 2002 - pmladek@suse.cz
- used macro %%{_libdir} to fix for lib64
- fixed rights of static library to 644
- fixed documentation in /usr/share/doc/packages/gpm
* Tue Jan 08 2002 - egmont@suselinux.hu
- removed colons from init script messages
* Tue Jan 08 2002 - ro@suse.de
- moved GPM_PARAM to /etc/sysconfig/mouse
* Mon Dec 10 2001 - pmladek@suse.cz
- updated to version 1.19.6:
* Synaptics 4 Button Touchpad support
* IntelliMouse Explorer support
* some bug fixes
- removed obsolete mktemp security patch
* Wed Dec 05 2001 - ro@suse.de
- add "-p" to macro call to deactivate perl-hack
* Wed Dec 05 2001 - ro@suse.de
- use fillup_and_insserv and removed START_GPM
- move variable GPM_PARAM to this package
* Thu Oct 18 2001 - pmladek@suse.cz
- fixed permissions of /dev/gpmctl back to 777, thus the
applications (mc) can use mouse support for normal user (#11893)
* Mon Sep 17 2001 - pmladek@suse.cz
- fixed to detect tokens AA 00 only in protocols
for ps/2 mouses
* Mon Sep 10 2001 - pmladek@suse.cz
- fixed to read only two bytes when mouse is
reconected and it sends tokens AA 00
* Fri Sep 07 2001 - pmladek@suse.cz
- fixed detection of reconnection of ps2 mouses and friends
with kernel 2.4.9 or higher (bug #9822)
* I take inspiration in patch from
George Staikos (staikos@0wned.org)
* Thu Aug 23 2001 - pmladek@suse.cz
- updated to version 1.19.3:
* security fixes:
* close the newly accept()ed socket in case of
identification failure
* removed initial setuid(0) call
* added initgroups()
* many bugfixes
* features:
* re-check console size on console change
* changed use of -o option
- removed obsolete security patches
- removed obsolete resize patch
- applied two patches from RedHat:
* fix permissions on /dev/gpmctl
* call initgroups in gpm-root before spawning command as user
* make gpm-root work on big endian
* Mon Aug 06 2001 - kukuk@suse.de
- Fix comment about init script location [Bug #9494]
* Thu Jun 14 2001 - pmladek@suse.cz
- fixed link libgpm.so.1
* Fri Jun 08 2001 - kukuk@suse.de
- Use _libdir macros
* Fri Jun 08 2001 - pmladek@suse.cz
- fixed to compile on sparc64 (libraries in /usr/lib64 now)
- fixed BUILD_ROOT
* Wed May 16 2001 - pmladek@suse.cz
- fixed cast warnings on ia64
* Mon Apr 23 2001 - pmladek@suse.cz
- fixed warnings on ia64
* Thu Apr 12 2001 - pmladek@suse.cz
- fixed init script by new skeleton
- fixed to compile
- removed include $(DEPS) from makefile
* Mon Jan 15 2001 - nadvornik@suse.cz
- added Required-Start: $remote_fs $syslog [bug #5580]
* Tue Jan 02 2001 - olh@suse.de
- add script name to %%postin
* Wed Dec 20 2000 - pthomas@suse.de
- Fix bug in Gpm_Wgetch
* Tue Nov 28 2000 - ro@suse.de
- sbin/init.d -> etc/init.d
* Wed Nov 22 2000 - nadvornik@suse.cz
- removed runlevel links
- fixed init script
* Mon Oct 09 2000 - nadvornik@suse.cz
- fixed Copyright
- used bzip2
* Fri Oct 06 2000 - schwab@suse.de
- Use getdtablesize() instead of OPEN_MAX.
* Mon Jul 17 2000 - nadvornik@suse.cz
- added security patch for disable-paste. Now it don't
need to be installed with suid root.
* Thu Apr 27 2000 - nadvornik@suse.cz
- added initgroups() patch
- used --sysconfdir=/etc
* Tue Apr 18 2000 - nadvornik@suse.cz
- added BuildRoot
* Mon Apr 03 2000 - uli@suse.de
- merged in gpm-root fix by Alessandro Rubini
* Fri Feb 25 2000 - kukuk@suse.de
- Move /usr/{info,man} -> /usr/share/{info,man}
* Mon Jan 31 2000 - uli@suse.de
- added fix for possible /tmp race attacks by thomas@suse.de
* Fri Dec 17 1999 - ro@suse.de
- removed params for ldconfig (-l does not work any more)
- update to 1.18.1
- got rid of Makefile.Linux
- use RPM_OPT_FLAGS for configure
* Mon Oct 11 1999 - uli@suse.de
- update -> 1.18.0
* Mon Sep 13 1999 - bs@suse.de
- ran old prepare_spec on spec file to switch to new prepare_spec.
* Tue Mar 16 1999 - ro@suse.de
- fixed rc-script: check if gpm already running
* Fri Mar 05 1999 - ro@suse.de
- fixed rc script
* Tue Mar 02 1999 - ro@suse.de
- update to 1.17.5
* Mon Dec 07 1998 - ro@suse.de
- updated init-script
- added rcgpm symlink
* Fri Oct 24 1997 - florian@suse.de
- update to gpm 1.13
* Sun May 04 1997 - bs@suse.de
- added /var/adm/setup/setup.selection
* Wed Apr 30 1997 - florian@suse.de
- update to version 1.12
* Thu Jan 02 1997 - florian@suse.de
- move startup scripts from aaa_base to gpm.tgz

135
rcgpm Normal file
View File

@ -0,0 +1,135 @@
#!/bin/sh
# Copyright (c) 1995-2002 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# Author:
#
# /etc/init.d/gpm
#
# and it's symbolic link
#
# /usr/sbin/rcgpm
#
### BEGIN INIT INFO
# Provides: gpm
# Required-Start: $remote_fs $syslog
# X-UnitedLinux-Should-Start:
# Required-Stop: $remote_fs $syslog
# X-UnitedLinux-Should-Stop:
# Default-Start: 2 3
# Default-Stop: 0 1 5 6
# Description: Start gpm to allow mouse on console
### END INIT INFO
# Check for missing binaries (stale symlinks should not happen)
GPM_BIN=/usr/sbin/gpm
test -x $GPM_BIN || { echo "$GPM_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
# Check for existence of needed config file and read it
GPM_SYSCONFIG=/etc/sysconfig/mouse
test -r $GPM_SYSCONFIG || { echo "$GPM_SYSCONFIG not existing";
echo "Run 'yast mouse' to set up gpm";
if [ "$1" = "stop" ]; then exit 0;
else exit 6; fi; }
. $GPM_SYSCONFIG
# Check for existence of needed values from $GPM_SYSCONFIG
test \( "$MOUSEDEVICE" -a "$MOUSETYPE" \) -o "$GPM_PARAM" || {
echo "Neither the variables MOUSEDEVICE and MOUSETYPE nor the variable GPM_PARAM";
echo "is set in $GPM_SYSCONFIG";
echo "Run 'yast mouse' to set up gpm";
if [ "$1" = "stop" ]; then exit 0;
else exit 6; fi; }
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_status -s display "skipped" and exit with status 3
# rc_status -u display "unused" and exit with status 3
# rc_failed set local and overall rc status to failed
# rc_failed <num> set local and overall rc status to <num>
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
# rc_active checks whether a service is activated by symlinks
# rc_splash arg sets the boot splash screen to arg (if active)
. /etc/rc.status
# First reset status of this service
rc_reset
# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - user had insufficient privileges
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
#
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signaling is not supported) are
# considered a success.
case "$1" in
start)
echo -n "Starting console mouse support (gpm)"
if test "$GPM_PARAM" ; then
startproc $GPM_BIN $GPM_PARAM
else
ADD_PARAMS=""
if test "$GPM_REPEAT" ; then
ADD_PARAMS="$ADD_PARAMS -R$GPM_REPEAT"
fi
startproc $GPM_BIN -m $MOUSEDEVICE -t $MOUSETYPE $ADD_PARAMS
fi
rc_status -v
;;
stop)
echo -n "Shutting down console mouse support (gpm)"
killproc -TERM $GPM_BIN
rc_status -v
;;
try-restart)
$0 status >/dev/null && $0 restart
rc_status
;;
restart)
$0 stop
$0 start
rc_status
;;
force-reload)
echo -n "Reload console mouse support (gpm)"
$0 stop && $0 start
rc_status
;;
reload)
echo -n "Reload console mouse support (gpm)"
rc_failed 3
rc_status -v
;;
status)
echo -n "Checking for console mouse support (gpm): "
checkproc $GPM_BIN
rc_status -v
;;
probe)
GPM_RESTART="False"
for file in $GPM_SYSCONFIG /etc/gpm/* ; do
test $file -nt /var/run/gpm.pid && GPM_RESTART="True"
done
test "$GPM_RESTART" = "True" && echo restart
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
exit 1
;;
esac
rc_exit

0
ready Normal file
View File

37
sysconfig.mouse-gpm Normal file
View File

@ -0,0 +1,37 @@
## Path: Hardware/Mouse/Console
## Description: Console mouse configuration
## ServiceRestart: gpm
#
## Type: string(/dev/input/mice,/dev/psaux)
## Default: ""
#
# The mouse device used on the console by gpm.
# The default value is generated by YaST.
#
MOUSEDEVICE=""
## Type: string(imps2,ms,ms3,msc,mman,ps2,syn,synps2)
## Default: ""
#
# The mouse type which defines the mouse protocol used by gpm for the mouse
# device in the variable MOUSEDEVICE
# The default value is generated by YaST
#
MOUSETYPE=""
## Type: string
## Default: ""
#
# You can define your own options to start gpm here. If the variable is empty
# then the gpm will start with the option "-m $MOUSEDEVICE -t $MOUSETYPE"
#
GPM_PARAM=""
## Type: string(raw,imps2,ms,ms3,msc,mman,ps2,syn,synps2)
## Default: ""
#
# Define type of repeating for gpm. This is usually needed when you want to
# use gpm together with XFree. All mouse data will be repeated in fifo
# /dev/gpmdata. Use "raw" for repeating same data as received by gpm.
#
GPM_REPEAT=""