bsd fixes, for null drive data

This commit is contained in:
inxi-svn 2014-09-23 02:37:10 +00:00
parent ab8fa3f375
commit dedb8d5fa7

21
inxi
View file

@ -11538,7 +11538,6 @@ print_graphics_data()
print_hard_disk_data() print_hard_disk_data()
{ {
eval $LOGFS eval $LOGFS
local b_bsd_debugger='true'
local hdd_data='' hdd_data_2='' a_hdd_working='' hdd_temp_data='' hdd_string='' local hdd_data='' hdd_data_2='' a_hdd_working='' hdd_temp_data='' hdd_string=''
local hdd_serial='' dev_string='/dev/' local hdd_serial='' dev_string='/dev/'
local dev_data='' size_data='' hdd_model='' usb_data='' hdd_name='' local dev_data='' size_data='' hdd_model='' usb_data='' hdd_name=''
@ -11553,7 +11552,7 @@ print_hard_disk_data()
IFS="$ORIGINAL_IFS" IFS="$ORIGINAL_IFS"
local hdd_capacity="${a_hdd_basic_working[0]}" local hdd_capacity="${a_hdd_basic_working[0]}"
local hdd_used=${a_hdd_basic_working[1]} local hdd_used=${a_hdd_basic_working[1]}
local bsd_unsupported='Hard drive data not yet supported for BSD systems.' local bsd_error="No HDD Info. $FILE_DMESG_BOOT not readable?"
local hdd_name_temp='' part_1_data='' part_2_data='' local hdd_name_temp='' part_1_data='' part_2_data=''
local row_starter="${C1}HDD Total Size$SEP3${C2} $hdd_capacity ($hdd_used) " local row_starter="${C1}HDD Total Size$SEP3${C2} $hdd_capacity ($hdd_used) "
# in bsd, /dev/wd0c is disk id # in bsd, /dev/wd0c is disk id
@ -11564,6 +11563,14 @@ print_hard_disk_data()
if [[ $B_SHOW_BASIC_DISK == 'true' || $B_SHOW_DISK == 'true' ]];then if [[ $B_SHOW_BASIC_DISK == 'true' || $B_SHOW_DISK == 'true' ]];then
## note: the output part of this should be in the print hdd data function, not here ## note: the output part of this should be in the print hdd data function, not here
get_hard_drive_data_advanced get_hard_drive_data_advanced
# temporary message to indicate not yet supported
if [[ $BSD_TYPE == 'bsd' && -z $Dmesg_Boot_Data ]];then
hdd_data=$bsd_error
hdd_data=$( create_print_line "$Line_Starter" "$hdd_data" )
print_screen_output "$hdd_data"
Line_Starter=' '
else
for (( i=0; i < ${#A_HDD_DATA[@]} - 1; i++ )) for (( i=0; i < ${#A_HDD_DATA[@]} - 1; i++ ))
do do
# this adds the (x) numbering in front of each disk found, and creates the full disk string # this adds the (x) numbering in front of each disk found, and creates the full disk string
@ -11657,19 +11664,9 @@ print_hard_disk_data()
print_screen_output "$hdd_data" print_screen_output "$hdd_data"
#echo 5 #echo 5
fi fi
# temporary message to indicate not yet supported
if [[ $b_bsd_debugger == 'false' && $BSD_TYPE == 'bsd' ]];then
hdd_data=$bsd_unsupported
hdd_data=$( create_print_line "$Line_Starter" "$hdd_data" )
print_screen_output "$hdd_data"
Line_Starter=' '
fi fi
else else
# temporary message to indicate not yet supported
hdd_data="$row_starter" hdd_data="$row_starter"
if [[ $b_bsd_debugger == 'false' && $BSD_TYPE == 'bsd' ]];then
hdd_data=$bsd_unsupported
fi
hdd_data=$( create_print_line "$Line_Starter" "$hdd_data" ) hdd_data=$( create_print_line "$Line_Starter" "$hdd_data" )
print_screen_output "$hdd_data" print_screen_output "$hdd_data"
Line_Starter=' ' Line_Starter=' '