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()
{
eval $LOGFS
local b_bsd_debugger='true'
local hdd_data='' hdd_data_2='' a_hdd_working='' hdd_temp_data='' hdd_string=''
local hdd_serial='' dev_string='/dev/'
local dev_data='' size_data='' hdd_model='' usb_data='' hdd_name=''
@ -11553,7 +11552,7 @@ print_hard_disk_data()
IFS="$ORIGINAL_IFS"
local hdd_capacity="${a_hdd_basic_working[0]}"
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 row_starter="${C1}HDD Total Size$SEP3${C2} $hdd_capacity ($hdd_used) "
# 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
## note: the output part of this should be in the print hdd data function, not here
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++ ))
do
# 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"
#echo 5
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
else
# temporary message to indicate not yet supported
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" )
print_screen_output "$hdd_data"
Line_Starter=' '