diff --git a/pinxi b/pinxi index c207891..cfda237 100755 --- a/pinxi +++ b/pinxi @@ -36639,7 +36639,7 @@ sub system_item { my $data = { $data_name => [{}], }; - $index = scalar(@{$data->{$data_name}}) - 1; + $index = 0; if ($show{'host'}){ $data->{$data_name}[$index]{main::key($num++,0,1,'Host')} = main::get_hostname(); } @@ -36668,7 +36668,6 @@ sub system_item { } } if ($b_admin && (my $params = KernelParameters::get())){ - # $index = scalar(@{$data{$data_name}}); # not on own line for now # print "$params\n"; if ($use{'filter-label'}){ $params = main::filter_partition('system', $params, 'label'); @@ -36677,8 +36676,9 @@ sub system_item { $params = main::filter_partition('system', $params, 'uuid'); } $data->{$data_name}[$index]{main::key($num++,0,2,'parameters')} = $params; - $index = scalar(@{$data->{$data_name}}); + } + $index++; # note: tty can have the value of 0 but the two tools # return '' if undefined, so we test for explicit '' if ($b_display){