FreeBSD Bugzilla – Attachment 179088 Details for
Bug 216275
x11-drivers/xf86-input-penmount: update for compatibility with modern X server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
update x11-drivers/xf86-input-penmount
x11-drivers_xf86-input-penmount.patch (text/plain), 7.46 KB, created by
Matthew Rezny
on 2017-01-19 20:35:09 UTC
(
hide
)
Description:
update x11-drivers/xf86-input-penmount
Filename:
MIME Type:
Creator:
Matthew Rezny
Created:
2017-01-19 20:35:09 UTC
Size:
7.46 KB
patch
obsolete
>Index: x11-drivers/xf86-input-penmount/Makefile >=================================================================== >--- x11-drivers/xf86-input-penmount/Makefile (revision 431798) >+++ x11-drivers/xf86-input-penmount/Makefile (working copy) >@@ -2,7 +2,7 @@ > > PORTNAME= xf86-input-penmount > PORTVERSION= 1.5.0 >-PORTREVISION= 4 >+PORTREVISION= 5 > CATEGORIES= x11-drivers > > MAINTAINER= x11@FreeBSD.org >Index: x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2 >=================================================================== >--- x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2 (nonexistent) >+++ x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2 (working copy) >@@ -0,0 +1,28 @@ >+From f5aede2ed48f1cc7266e792b02f509f7b207e2d6 Mon Sep 17 00:00:00 2001 >+From: Peter Hutterer <peter.hutterer@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@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: x11-drivers/xf86-input-penmount/files/patch-git_01_f5aede2 >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >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 >Index: x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9 >=================================================================== >--- x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9 (nonexistent) >+++ x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9 (working copy) >@@ -0,0 +1,82 @@ >+From ff389f91a2efec5184b56b8c717091d067f8fc46 Mon Sep 17 00:00:00 2001 >+From: Peter Hutterer <peter.hutterer@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@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: x11-drivers/xf86-input-penmount/files/patch-git_02_ff389f9 >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >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 >Index: x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c >=================================================================== >--- x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c (nonexistent) >+++ x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c (working copy) >@@ -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: x11-drivers/xf86-input-penmount/files/patch-src_xf86PM.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 216275
: 179088