From 4d7d43580ade93fd3b0ce7f9f5f9c8d1286f5c0f Mon Sep 17 00:00:00 2001 From: Harald Hope Date: Sun, 12 Jun 2022 15:10:14 -0700 Subject: [PATCH] bug fix, corner case, undefined array ref test in disks. --- inxi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/inxi b/inxi index 184c1d1..11537c6 100755 --- a/inxi +++ b/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 {