diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2012-03-04 17:55:32 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2012-03-04 17:55:32 +0000 |
commit | 1767f7a0c9da6c4201dd182e659b2485a1723fa2 (patch) | |
tree | 3c6822b251d628e73555bfc810eb665882dc0c2d | |
parent | 434e107f5f42a7f51376b01172da0155eb4b95e6 (diff) |
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.
-rw-r--r-- | xserver/hw/xfree86/common/xf86Config.c | 13 |
1 files changed, 12 insertions, 1 deletions
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 ** |