From 9505189f6216c39511321dd1b5d6faf7c8819a5e Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Fri, 25 Jul 2008 17:01:28 +0000 Subject: Make sure to report model count also when -l isn't used. --- hardware-models | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'hardware-models') diff --git a/hardware-models b/hardware-models index 3cb857d..ebdc390 100755 --- a/hardware-models +++ b/hardware-models @@ -63,14 +63,14 @@ sub print_summary { printf " %s %s/%s %s\n", $hostname, $vendor, $model, $hostid; } } - for my $model (sort keys %{$models{$vendor}}) { - printf(" %-23s %5d\n", $model, $models{$vendor}{$model}); - if (exists $opts{l}) { - for my $hostid (sort @{$modelmap{$vendor}{$model}}) { - my $hostname = get_hostname($hostid); - my ($vendor, $model, undef) = get_hardware_info($hostid); - printf " %s %s/%s %s\n", $hostname, $vendor, $model, $hostid; - } + } + for my $model (sort keys %{$models{$vendor}}) { + printf(" %-23s %5d\n", $model, $models{$vendor}{$model}); + if (exists $opts{l}) { + for my $hostid (sort @{$modelmap{$vendor}{$model}}) { + my $hostname = get_hostname($hostid); + my ($vendor, $model, undef) = get_hardware_info($hostid); + printf " %s %s/%s %s\n", $hostname, $vendor, $model, $hostid; } } } -- cgit v1.2.3