mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
For video, added null case in video card detection
This commit is contained in:
parent
1dd41e1d02
commit
27a128f93c
6
inxi
6
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 0.2.7
|
||||
#### version: 0.2.8
|
||||
#### Date: October 30 2008
|
||||
########################################################################
|
||||
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
||||
|
@ -915,6 +915,10 @@ get_graphics_card_data()
|
|||
do
|
||||
A_GFX_CARD_DATA[i]=$( sanitize_characters A_NORMAL_BANS "${A_GFX_CARD_DATA[i]}" )
|
||||
done
|
||||
# handle cases where card detection fails, like in PS3, where lspci gives no output, or headless boxes..
|
||||
if [[ ${#A_GFX_CARD_DATA[@]} -eq 0 ]];then
|
||||
A_GFX_CARD_DATA[0]='Failed to Detect Video Card!'
|
||||
fi
|
||||
|
||||
# GFXMEM is UNUSED at the moment, because it shows AGP aperture size, which is not necessarily equal to GFX memory..
|
||||
# GFXMEM="size=[$(echo "$LSPCI" | gawk '/VGA/{while (!/^$/) {getline;if (/size=[0-9][0-9]*M/) {size2=gensub(/.*\[size=([0-9]+)M\].*/,"\\1","g",$0);if (size<size2){size=size2}}}}END{print size2}')M]"
|
||||
|
|
Loading…
Reference in a new issue