From 9272811889913e3285b653b969070ca7a9c66bfd Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Wed, 25 May 2011 00:39:40 +0000 Subject: [PATCH] added loaded, unloaded, and failed output to graphics driver output, like: nvidia->loaded --- inxi | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index 511e46c..3f9a0b5 100755 --- a/inxi +++ b/inxi @@ -3218,14 +3218,23 @@ get_graphics_driver() # 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='' driver_string='' spacer='' xorg_log_data='' + local driver='' driver_string='' spacer='' xorg_log_data='' status='' if [[ $B_XORG_LOG == 'true' ]];then xorg_log_data="$( cat $FILE_XORG_LOG )" for driver in $driver_list 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 - driver_string="$driver_string$driver$spacer" + if [[ -n $( grep -s "[[:space:]]Loading.*${driver}_drv.so" <<< "$xorg_log_data" ) ]];then + 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=' ' fi done