Author: branden Date: 2004-09-22 01:44:15 -0500 (Wed, 22 Sep 2004) New Revision: 1845
Modified: branches/debconf-overhaul/debian/xserver-xfree86.config.in Log: When figuring out whether the reported fbcon type supports the UseFBDev interface, use a word-delimited match (grep -w). Improve comments documenting UseFBDev logic. Modified: branches/debconf-overhaul/debian/xserver-xfree86.config.in =================================================================== --- branches/debconf-overhaul/debian/xserver-xfree86.config.in 2004-09-22 06:40:09 UTC (rev 1844) +++ branches/debconf-overhaul/debian/xserver-xfree86.config.in 2004-09-22 06:44:15 UTC (rev 1845) @@ -934,6 +934,9 @@ xserver-xfree86/config/device/video_ram # Use fbcon kernel interface? + + # For architectures that can use VGA BIOS-equipped video cards on the primary + # head, we initially assume fbcon is not in use (but see below). set_db_priority "high" case "$ARCH" in alpha|hurd-i386|i386|amd64) @@ -944,19 +947,24 @@ ;; esac - # XXX: is this a good test for /proc being mounted? + # Next, check for evidence of fbcon actually being in use by the Linux kernel, + # potentially changing the default we just set. + # XXX: Is this a good test for /proc being mounted? if [ -e /proc/self ]; then if [ -e /proc/fb ]; then fb_type="$(grep '^0 ' /proc/fb | sed 's/[^[:space:]] //')" trace "$func(): /proc/fb reports framebuffer type \"$fb_type\"" - # did we actually get back anything? + # Did we actually get back anything? if [ -n "$fb_type" ]; then + # We know that fbcon is being used, so we can set a reasonable default. set_db_priority "medium" - if echo "$fb_type" | grep -Eiq '(OFfb|VESA)'; then + if echo "$fb_type" | grep -Eiqw '(OFfb|VESA)'; then + # The OpenFirmware and VESA fbcon drivers can't be externally + # manipulated (i.e., no UseFBDev). trace "$func(): this framebuffer type does not support UseFBDev" default_use_fbdev=false - else - # other framebuffers do support UseFBDev + else + # Other framebuffers do support UseFBDev. default_use_fbdev=true fi fi