mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
bug fix, corner case, undefined array ref test in disks.
This commit is contained in:
parent
354c44eb76
commit
4d7d43580a
8
inxi
8
inxi
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue