bug fix, corner case, undefined array ref test in disks.

This commit is contained in:
Harald Hope 2022-06-12 15:10:14 -07:00
parent 354c44eb76
commit 4d7d43580a

8
inxi
View file

@ -13075,7 +13075,7 @@ sub scsi_data {
eval $start if $b_log;
my ($file) = @_;
my @temp = main::reader($file);
my (@scsi);
my $scsi = [];
my ($firmware,$model,$vendor) = ('','','');
foreach (@temp){
if (/Vendor:\s*(.*)\s+Model:\s*(.*)\s+Rev:\s*(.*)/i){
@ -13085,7 +13085,7 @@ sub scsi_data {
}
if (/Type:/i){
if (/Type:\s*Direct-Access/i){
push(@scsi, {
push(@$scsi, {
'vendor' => $vendor,
'model' => $model,
'firmware' => $firmware,
@ -13096,9 +13096,9 @@ sub scsi_data {
}
}
}
main::log_data('dump','@scsi', \@scsi) if $b_log;
main::log_data('dump','@$scsi', $scsi) if $b_log;
eval $end if $b_log;
return \@scsi;
return $scsi;
}
# @b_id has already been cleaned of partitions, wwn-, nvme-eui
sub disk_data_by_id {