diff options
author | Peter Osterlund <petero2@telia.com> | 2003-05-02 01:53:37 +0200 |
---|---|---|
committer | Peter Osterlund <petero2@telia.com> | 2006-04-09 04:00:53 +0200 |
commit | efe5015664abf88ab780aa47dad1a8c528d87329 (patch) | |
tree | 995920c8da492481133bbca492cba949021156e7 | |
parent | 826b2136b226d29017271b7c098179f04c6c51b3 (diff) |
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.)
-rw-r--r-- | synaptics.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |