From 1dd1d440332cab49fe823e2bce15ed2d5a47ac29 Mon Sep 17 00:00:00 2001 From: Harald Hope Date: Mon, 20 Nov 2023 20:01:23 -0800 Subject: [PATCH] -I, -S line changes --- pinxi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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){