Few patches from Red Hat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Nico.

As promised I'm sending you 4 patches from Fedora
fixing/introducing miscellaneous stuff.

0000, 0001 & 0003 are fixes for minor issues

0002 introduces a new feature (gpm lib verbosity
     config via GPM_VERBOSE env. variable)

They're applicable on the latest master branch.

Please, look at the patches and if you find them
acceptable, then please merge them.

Thanks in advance.

Have a nice day.

Regards,
Jaromir.

--
Jaromir Capik
Red Hat Czech, s.r.o.
Software Engineer / BaseOS

Email: jcapik@xxxxxxxxxx
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkynova 99/71, 612 45, Brno, Czech Republic
IC: 27690016 


From 25cb9651fbbede51acf2ea676c178ce8b130bbce Mon Sep 17 00:00:00 2001
From: Jaromir Capik <jcapik@xxxxxxxxxx>
Date: Mon, 22 Jul 2013 15:44:30 +0200
Subject: [PATCH] Fixing typos in the man pages

---
 doc/doc.gpm.in | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/doc.gpm.in b/doc/doc.gpm.in
index 795b958..fb3eee9 100644
--- a/doc/doc.gpm.in
+++ b/doc/doc.gpm.in
@@ -600,7 +600,7 @@ error. When the document refer to ``standard serial options'' it means
 that one of @t{\-o dtr}, @t{\-o rts}, @t{\-o both} can be specified to
 toggle the control lines of the serial port.
 
-The following mouse type are corrently recognized:
+The following mouse type are currently recognized:
 
 @table @code
 @item bare Microsoft
@@ -621,7 +621,7 @@ The following mouse type are corrently recognized:
         this is your case, use the @samp{bare} mouse type.  Some new
         two-button devices are ``plug and play'', and they don't play
         fair at all; in this case try @t{\-t pnp}.  Many (most)
-        three-button devices that use the microsoft protocol fail to
+        three-button devices that use the Microsoft protocol fail to
         report some middle-button events during mouse motion.  Since
         the protocol does not distinguish between the middle button
         going up and the middle button going down it would be liable
@@ -649,7 +649,7 @@ The following mouse type are corrently recognized:
 	decoder gets into a confused state where it thinks the middle
 	button is up when it's down and vice versa. (If you get sick
 	of having to do this, please don't blame gpm; blame your buggy
-	mouse! Note that most three-button mice that do the microsoft
+	mouse! Note that most three-button mice that do the Microsoft
 	protocol can be made to do the MouseSystems protocol
 	instead. The ``3 Button Serial Mouse mini-HOWTO'' has
 	information about this.)  This mouse decoder accepts standard
-- 
1.8.1.4

From bf19b026b3a4c3c97f8ebf25a25b3cea68e60b67 Mon Sep 17 00:00:00 2001
From: Jaromir Capik <jcapik@xxxxxxxxxx>
Date: Mon, 22 Jul 2013 15:51:38 +0200
Subject: [PATCH] Closing file descriptors

---
 src/daemon/startup.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/daemon/startup.c b/src/daemon/startup.c
index 1d00255..4d85e8c 100644
--- a/src/daemon/startup.c
+++ b/src/daemon/startup.c
@@ -135,6 +135,13 @@ void startup(int argc, char **argv)
    check_uniqueness();
    gpm_report(GPM_PR_INFO,GPM_MESS_STARTED);
 
+   // close extra fds
+   if (option.run_status == GPM_RUN_STARTUP ) {
+       close(0);
+       close(1);
+       close(2);
+   }
+
    //return mouse_table[1].fd; /* the second is handled in the main() */
 
    /****************** OLD CODE from gpn.c  END ***********************/
-- 
1.8.1.4

From cd2f62170c0704207784b53bd2010af491c17828 Mon Sep 17 00:00:00 2001
From: Jaromir Capik <jcapik@xxxxxxxxxx>
Date: Mon, 22 Jul 2013 18:19:38 +0200
Subject: [PATCH] Adding support for verbosity config via env. variable
 GPM_VERBOSE

---
 configure.ac.footer  | 10 ++++++++++
 src/lib/report-lib.c | 14 ++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/configure.ac.footer b/configure.ac.footer
index 89a4cd9..10cf00a 100644
--- a/configure.ac.footer
+++ b/configure.ac.footer
@@ -83,6 +83,16 @@ AS_IF([test "x$enable_static" = "xyes"], [
 ])
 
 
+AC_ARG_ENABLE([verbose-env],
+[  --enable-verbose-env    enable env. variable GPM_VERBOSE @<:@default=no@:>@],
+              [enable_verbose_env=$enableval],
+              [enable_verbose_env="no"])
+
+AS_IF([test "x$enable_verbose_env" = "xyes"], [
+    AC_DEFINE([WITH_VERBOSE_ENV], [1], [Enable environmental variable GPM_VERBOSE])
+])
+
+
 AC_ARG_WITH(curses,
 [  --without-curses        disable curses support even if curses found])
 
diff --git a/src/lib/report-lib.c b/src/lib/report-lib.c
index c0ae086..2b604b3 100644
--- a/src/lib/report-lib.c
+++ b/src/lib/report-lib.c
@@ -24,8 +24,22 @@
 
 #include "headers/message.h"
 
+
+#ifdef WITH_VERBOSE_ENV
+static int gpm_silent() {
+   if ( getenv( "GPM_VERBOSE" ) == NULL ) return 1;
+   return 0;
+}
+#endif
+
 void gpm_report(int line, char *file, int stat, char *text, ... )
 {
+
+#ifdef WITH_VERBOSE_ENV
+   if ( gpm_silent() && stat != GPM_STAT_OOPS )
+      return;
+#endif
+
    char *string = NULL;
    int log_level;
    va_list ap;
-- 
1.8.1.4

From f99856fb97c9e3e11c7ff0790a717992fe0d31e1 Mon Sep 17 00:00:00 2001
From: Jaromir Capik <jcapik@xxxxxxxxxx>
Date: Mon, 22 Jul 2013 18:42:58 +0200
Subject: [PATCH] Fixing missing header dir in Makefile.in

---
 src/Makefile.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Makefile.in b/src/Makefile.in
index 6b60ad3..1583fab 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -96,7 +96,7 @@ $(DEPFILE) dep: prog/gpm-root.c
 
 	# create dependencies
 	for DEPS in `echo *.c */*.c`; do \
-	$(CC) -I. -I $(srcdir) -M @CPPFLAGS@ $(CPPFLAGS) $$DEPS | \
+	$(CC) -I. -Iheaders -I $(srcdir) -M @CPPFLAGS@ $(CPPFLAGS) $$DEPS | \
 	$(SED) 's/^\(.*\)\.o\([ :]+\)/\1.o \1.lo\2/g' >> $(DEPFILE) ; done
 
 ### INSTALL
-- 
1.8.1.4

_______________________________________________
gpm mailing list
gpm@xxxxxxxxxxxxxx
http://lists.linux.it/listinfo/gpm

[Index of Archives]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Gimp]     [Yosemite News]