Sophie

Sophie

distrib > Mandriva > 2009.1 > i586 > media > main-release-src > by-pkgid > ed850f9ceda4826f28781585a4806f28 > files > 3

x11-server-1.6.1-1mdv2009.1.src.rpm

From 11451f7ffe088d51a4f835d589ae8821a19eb0b9 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <cguthrie@mandriva.org>
Date: Tue, 23 Dec 2008 22:54:13 +0000
Subject: [PATCH 302/305] RH: xserver-1.5.0-bad-fbdev-thats-mine v1.2

---
 hw/xfree86/common/xf86Bus.c   |    3 +++
 hw/xfree86/common/xf86fbBus.c |    7 +++++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
index b94d500..484f3a8 100644
--- a/hw/xfree86/common/xf86Bus.c
+++ b/hw/xfree86/common/xf86Bus.c
@@ -429,6 +429,9 @@ xf86GetEntityInfo(int entityIndex)
     EntityInfoPtr pEnt;
     int i;
     
+    if (entityIndex == -1)
+	return NULL;
+
     if (entityIndex >= xf86NumEntities)
 	return NULL;
     
diff --git a/hw/xfree86/common/xf86fbBus.c b/hw/xfree86/common/xf86fbBus.c
index 102f6b1..cfd8811 100644
--- a/hw/xfree86/common/xf86fbBus.c
+++ b/hw/xfree86/common/xf86fbBus.c
@@ -58,6 +58,13 @@ xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active)
 {
     EntityPtr p;
     int num;
+
+    if (pciSlotClaimed)
+	return -1;
+#if defined(__sparc__) || defined (__sparc64__)
+    if (sbusSlotClaimed)
+	return -1;
+#endif
     
     num = xf86AllocateEntity();
     p = xf86Entities[num];
-- 
1.6.1.3