[Midnightbsd-cvs] mports [24000] trunk/x11-drivers/xf86-input-penmount: add patchset

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Tue Aug 28 09:02:56 EDT 2018


Revision: 24000
          http://svnweb.midnightbsd.org/mports/?rev=24000
Author:   laffer1
Date:     2018-08-28 09:02:55 -0400 (Tue, 28 Aug 2018)
Log Message:
-----------
add patchset

Modified Paths:
--------------
    trunk/x11-drivers/xf86-input-penmount/Makefile

Added Paths:
-----------
    trunk/x11-drivers/xf86-input-penmount/files/
    trunk/x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2
    trunk/x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9
    trunk/x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c

Modified: trunk/x11-drivers/xf86-input-penmount/Makefile
===================================================================
--- trunk/x11-drivers/xf86-input-penmount/Makefile	2018-08-28 13:02:05 UTC (rev 23999)
+++ trunk/x11-drivers/xf86-input-penmount/Makefile	2018-08-28 13:02:55 UTC (rev 24000)
@@ -2,7 +2,7 @@
 
 PORTNAME=	xf86-input-penmount
 PORTVERSION=	1.5.0
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	x11-drivers
 
 MAINTAINER=	ports at MidnightBSD.org

Added: trunk/x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2
===================================================================
--- trunk/x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2	2018-08-28 13:02:55 UTC (rev 24000)
@@ -0,0 +1,28 @@
+From f5aede2ed48f1cc7266e792b02f509f7b207e2d6 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Fri, 8 Jul 2011 14:26:16 +1000
+Subject: Don't override the device name.
+
+The device name comes from the xorg.conf (or the config backend). If you're
+capable of setting the device name in the config, you can set it in the
+Identifier line as well.
+
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+diff --git a/src/xf86PM.c b/src/xf86PM.c
+index edcf6f8..97e2134 100644
+--- src/xf86PM.c
++++ src/xf86PM.c
+@@ -492,9 +492,6 @@ PenMountPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+ 		goto SetupProc_fail;
+ 	}
+ 
+-	/* this results in an xstrdup that must be freed later */
+-	pInfo->name = xf86SetStrOption( pInfo->options, "DeviceName", "PenMount");
+-
+ 	return Success;
+ 
+   SetupProc_fail:
+-- 
+cgit v0.10.2
+


Property changes on: trunk/x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9
===================================================================
--- trunk/x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9	2018-08-28 13:02:55 UTC (rev 24000)
@@ -0,0 +1,82 @@
+From ff389f91a2efec5184b56b8c717091d067f8fc46 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Tue, 19 Jul 2011 13:07:41 +1000
+Subject: Don't free anything in PreInit, let the server call UnInit instead
+
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+
+diff --git a/src/xf86PM.c b/src/xf86PM.c
+index 97e2134..ef73164 100644
+--- src/xf86PM.c
++++ src/xf86PM.c
+@@ -79,7 +79,7 @@ _X_EXPORT InputDriverRec PENMOUNT = {
+         "penmount",
+         NULL,
+         PenMountPreInit,
+-        /*PenMountUnInit*/NULL,
++        PenMountUnInit,
+         NULL,
+         default_options
+ };
+@@ -275,6 +275,7 @@ ProcessDeviceClose(PenMountPrivatePtr priv, DeviceIntPtr dev, InputInfoPtr pInfo
+ 					priv->buffer = NULL;
+ 				}
+ 			xf86CloseSerial(pInfo->fd);
++			pInfo->fd = -1;
+ 		}
+ 	dev->public.on = FALSE;
+ 	return (Success);
+@@ -454,6 +455,8 @@ PenMountPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+ 		goto SetupProc_fail;
+ 	}
+ 	xf86CloseSerial(pInfo->fd);
++	pInfo->fd = -1;
++
+ 	/* 
+ 	 * Process the options for your device like this
+ 	 */
+@@ -495,16 +498,21 @@ PenMountPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+ 	return Success;
+ 
+   SetupProc_fail:
+-	if ((pInfo) && (pInfo->fd))
+-		xf86CloseSerial (pInfo->fd);
+-	if ((pInfo) && (pInfo->name))
+-		free (pInfo->name);
++	return BadValue;
++}
++
++static void
++PenMountUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
++{
++	PenMountPrivatePtr priv = (PenMountPrivatePtr) (pInfo->private);
+ 
+-	if ((priv) && (priv->buffer))
+-		XisbFree (priv->buffer);
+ 	if (priv)
++	{
++		if (priv->buffer)
++			XisbFree (priv->buffer);
+ 		free (priv);
+-	return BadValue;
++		pInfo->private = NULL;
++	}
+ }
+ 
+ static Bool
+diff --git a/src/xf86PM.h b/src/xf86PM.h
+index 5183f91..88da048 100644
+--- src/xf86PM.h
++++ src/xf86PM.h
+@@ -93,6 +93,8 @@ static Bool PenMountSendPacket (PenMountPrivatePtr priv, unsigned char *buf, int
+ 
+ static int
+ PenMountPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
++static void
++PenMountUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
+ 
+ static void
+ PenMountPtrCtrl(DeviceIntPtr device, PtrCtrl *ctrl);
+-- 
+cgit v0.10.2
+


Property changes on: trunk/x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c
===================================================================
--- trunk/x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c	                        (rev 0)
+++ trunk/x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c	2018-08-28 13:02:55 UTC (rev 24000)
@@ -0,0 +1,69 @@
+# Finish converting AddEnabledDefice to xf86AddEnabledDevice
+# Correct a couple strings that should be const
+# Remove use of obsolete xf86XInputSetScreen
+#
+--- src/xf86PM.c.orig	2011-06-28 00:37:48 UTC
++++ src/xf86PM.c
+@@ -61,7 +61,7 @@
+  * Be sure to set vmin appropriately for your device's protocol. You want to
+  * read a full packet before returning
+  */
+-static char *default_options[] =
++static const char *default_options[] =
+ {
+ 	/*	"Device", "/dev/ttyS1",*/
+ 	"BaudRate", "19200",
+@@ -258,7 +258,7 @@ DMC9000_ProcessDeviceOn(PenMountPrivateP
+ 	priv->lex_mode = PenMount_byte0;
+ 	
+ 	xf86FlushInput(pInfo->fd);
+-	AddEnabledDevice (pInfo->fd);
++	xf86AddEnabledDevice (pInfo);
+ 	dev->public.on = TRUE;
+ 	return (Success);
+ }
+@@ -268,7 +268,7 @@ ProcessDeviceClose(PenMountPrivatePtr pr
+ {
+ 	if (pInfo->fd != -1)
+ 		{ 
+-			RemoveEnabledDevice (pInfo->fd);
++			xf86RemoveEnabledDevice (pInfo);
+ 			if (priv->buffer)
+ 				{
+ 					XisbFree(priv->buffer);
+@@ -418,7 +418,7 @@ static int
+ PenMountPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+ {
+ 	PenMountPrivatePtr priv = calloc (1, sizeof (PenMountPrivateRec));
+-	char *s;
++	const char *s;
+ 
+ 	if (!priv)
+ 		return BadAlloc;
+@@ -603,7 +603,7 @@ DeviceControl (DeviceIntPtr dev, int mod
+ 		priv->lex_mode = PenMount_byte0;
+ 		
+ 		xf86FlushInput(pInfo->fd);
+-		AddEnabledDevice (pInfo->fd);
++		xf86AddEnabledDevice (pInfo);
+ 		dev->public.on = TRUE;
+ 		return (Success);
+ 		
+@@ -696,7 +696,7 @@ ReadInput (InputInfoPtr pInfo)
+ 					   priv->max_y);
+                 }        		
+ 
+-		xf86XInputSetScreen (pInfo, priv->screen_num, x, y);
++		//xf86XInputSetScreen (pInfo, priv->screen_num, x, y);
+ 
+ 		if ((priv->proximity == FALSE) && (priv->packet[0] & 0x01))
+ 		{
+@@ -796,7 +796,7 @@ DMC9000_ReadInput (InputInfoPtr pInfo)
+                 }
+         		
+ 
+-		xf86XInputSetScreen (pInfo, priv->screen_num, x, y);
++		//xf86XInputSetScreen (pInfo, priv->screen_num, x, y);
+ 
+ 		if ((priv->proximity == FALSE) && (priv->packet[0] & 0x01))
+ 		{


Property changes on: trunk/x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list