added loaded, unloaded, and failed output to graphics driver output, like: nvidia->loaded

This commit is contained in:
inxi-svn 2011-05-25 00:39:40 +00:00
parent b5ac8e13ad
commit 9272811889

15
inxi
View file

@ -3218,14 +3218,23 @@ get_graphics_driver()
# list is from sgfxi plus non-free drivers # list is from sgfxi plus non-free drivers
local driver_list='apm ark ati chips cirrus cyrix fbdev fglrx glint i128 i740 intel i810 imstt mach64 mga neomagic nsc nv nvidia openchrome nouveau radeon radeonhd rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng unichrome vesa vga via voodoo vmware v4l' local driver_list='apm ark ati chips cirrus cyrix fbdev fglrx glint i128 i740 intel i810 imstt mach64 mga neomagic nsc nv nvidia openchrome nouveau radeon radeonhd rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng unichrome vesa vga via voodoo vmware v4l'
local driver='' driver_string='' spacer='' xorg_log_data='' local driver='' driver_string='' spacer='' xorg_log_data='' status=''
if [[ $B_XORG_LOG == 'true' ]];then if [[ $B_XORG_LOG == 'true' ]];then
xorg_log_data="$( cat $FILE_XORG_LOG )" xorg_log_data="$( cat $FILE_XORG_LOG )"
for driver in $driver_list for driver in $driver_list
do do
if [[ -n $( grep -s "[[:space:]]Loading.*${driver}_drv.so" <<< "$xorg_log_data" ) && -z $( grep -s "[[:space:]]Unloading.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then if [[ -n $( grep -s "[[:space:]]Loading.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then
driver_string="$driver_string$driver$spacer" if [[ -z $( grep -si "[[:space:]]Unloading.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then
status='loaded'
else
if [[ -n $( grep -si "\(EE\)[[:space:]]Failed[[:space:]]to[[:space:]]load[[:space:]]module[[:space:]]\"${driver}\"" <<< "$xorg_log_data" ) ]];then
status='failed'
else
status='unloaded'
fi
fi
driver_string="$driver_string$driver->$status$spacer"
spacer=' ' spacer=' '
fi fi
done done