code cleanup

This commit is contained in:
inxi-svn 2009-08-07 00:07:41 +00:00
parent e41eeea227
commit 8768c2b0dd

18
inxi
View file

@ -3963,19 +3963,17 @@ print_hard_disk_data()
dev_data="/dev/${a_hdd_working[0]} "
size_data=" ${a_hdd_working[1]}"
hdd_name="${a_hdd_working[2]}"
fi
if [[ $B_EXTRA_DATA == 'true' && -n $dev_data ]];then
hdd_temp_data=$( get_hdd_temp_data "$dev_data" )
# error handling is done in get data function
if [[ -n $hdd_temp_data ]];then
hdd_temp_data=" ${hdd_temp_data}C"
else
hdd_temp_data=''
if [[ $B_EXTRA_DATA == 'true' && -n $dev_data ]];then
hdd_temp_data=$( get_hdd_temp_data "$dev_data" )
# error handling is done in get data function
if [[ -n $hdd_temp_data ]];then
hdd_temp_data=" ${hdd_temp_data}C"
else
hdd_temp_data=''
fi
fi
fi
if [[ $B_SHOW_DISK == 'true' ]];then
hdd_string="$usb_data$dev_data$hdd_name$size_data$hdd_temp_data"
hdd_model="${hdd_model}${C1}$(($i+1)):${C2} $hdd_string "
# printing line one, then every other line, and after, if leftovers, print that line.