From efe5015664abf88ab780aa47dad1a8c528d87329 Mon Sep 17 00:00:00 2001 From: Peter Osterlund Date: Fri, 2 May 2003 01:53:37 +0200 Subject: Fixed removal of old shared memory segment before trying to create the new segment. This made X server startup fail if the memory segment size had been changed. (The first argument to xf86shmget is an shmid, not a key.) --- synaptics.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/synaptics.c b/synaptics.c index 4572120..5856936 100644 --- a/synaptics.c +++ b/synaptics.c @@ -194,7 +194,8 @@ SynapticsPreInit(InputDriverPtr drv, IDevPtr dev, int flags) /* install shared memory or normal memory for parameter */ if(xf86SetBoolOption(local->options, "SHMConfig", FALSE)) { - xf86shmctl(SHM_SYNAPTICS, XF86IPC_RMID, NULL); + if ((shmid = xf86shmget(SHM_SYNAPTICS, 0, 0)) != -1) + xf86shmctl(shmid, XF86IPC_RMID, NULL); if((shmid = xf86shmget(SHM_SYNAPTICS, sizeof(SynapticsSHM), 0777 | XF86IPC_CREAT)) == -1) { xf86Msg(X_ERROR, "%s error shmget\n", local->name); -- cgit v1.2.3