From e4b13eedd8d9ee0b7258051ab7f641fd6c4bbc72 Mon Sep 17 00:00:00 2001 From: matthieu Date: Sun, 4 Mar 2012 17:55:31 +0000 Subject: [PATCH] Introduce a black list of drivers for Xorg -configure, and blacklist all radeon driver variants, except radeonold. This fixes the conflicting symbols warnings seen by Xorg -configure and forces it to use radeonold in the generated xorg.conf file. Xorg -configure is still broken in many ways, and should be avoided. --- xserver/hw/xfree86/common/xf86Config.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/xserver/hw/xfree86/common/xf86Config.c b/xserver/hw/xfree86/common/xf86Config.c index edebe6be9..7393c5ceb 100644 --- a/xserver/hw/xfree86/common/xf86Config.c +++ b/xserver/hw/xfree86/common/xf86Config.c @@ -499,7 +499,8 @@ static void fixup_video_driver_list(char **drivers) { static const char *fallback[4] = { "vesa", "fbdev", "wsfb", NULL }; - char **end, **drv; + static const char *blacklist[] = { "radeonhd", "radeon", NULL }; + char **end, **drv, **d; char *x; int i; @@ -520,6 +521,16 @@ fixup_video_driver_list(char **drivers) } } } + /* Remove blacklisted drivers */ + for (i = 0; blacklist[i]; i++) { + for (drv = drivers; drv != end; drv++) { + if (strcmp(*drv, blacklist[i]) == 0) { + end--; + for (d = drv; d != end; d++) + *d = *(d+1); + } + } + } } static char **