From 4e7910569f8f8f068e91b1604e9887627e495c71 Mon Sep 17 00:00:00 2001 From: Frodo Looijaard Date: Thu, 25 Feb 1999 08:30:04 +0000 Subject: [PATCH] Fixed a few display glitches, as well as a partially empty line for ISA misdetections. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@273 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/detect/detect.pl | 12 ++++++++---- prog/detect/sensors-detect | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/prog/detect/detect.pl b/prog/detect/detect.pl index d7a3241e..39fbb3cc 100755 --- a/prog/detect/detect.pl +++ b/prog/detect/detect.pl @@ -801,8 +801,7 @@ sub add_isa_to_chips_detected next; if (&$alias_detect ($datahash->{isa_addr},\*FILE, $new_misdetected_ref->[$j]->{address})) { - $new_misdetected_ref->[$j] = { %$new_misdetected_ref->[$j], - isa_addr => $datahash->{isa_addr}}; + $new_misdetected_ref->[$j]->{isa_addr} = $datahash->{isa_addr}; return; } close FILE; @@ -881,7 +880,12 @@ sub scan_adapter print "Success!\n", " (confidence $conf, driver `$$chip{driver}'"; if (@chips) { - print ", other addresses: @chips)\n"; + print ", other addresses:"; + my $other_addr; + foreach $other_addr (sort @chips) { + printf(" %02x",$other_addr); + } + printf "\n"; } else { print ")\n"; } @@ -1469,7 +1473,7 @@ sub main if $is_i2c; printf " Busdriver `%s', I2C address 0x%02x", $data->{driver}, $data->{address} if $is_i2c; - printf "(main: 0x%02x", $data->{main} if (exists $data->{main}); + printf " (main: 0x%02x)", $data->{main} if (exists $data->{main}); print " " if $is_i2c and $is_isa; if ($is_isa) { if ($data->{isa_addr}) { diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index d7a3241e..39fbb3cc 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -801,8 +801,7 @@ sub add_isa_to_chips_detected next; if (&$alias_detect ($datahash->{isa_addr},\*FILE, $new_misdetected_ref->[$j]->{address})) { - $new_misdetected_ref->[$j] = { %$new_misdetected_ref->[$j], - isa_addr => $datahash->{isa_addr}}; + $new_misdetected_ref->[$j]->{isa_addr} = $datahash->{isa_addr}; return; } close FILE; @@ -881,7 +880,12 @@ sub scan_adapter print "Success!\n", " (confidence $conf, driver `$$chip{driver}'"; if (@chips) { - print ", other addresses: @chips)\n"; + print ", other addresses:"; + my $other_addr; + foreach $other_addr (sort @chips) { + printf(" %02x",$other_addr); + } + printf "\n"; } else { print ")\n"; } @@ -1469,7 +1473,7 @@ sub main if $is_i2c; printf " Busdriver `%s', I2C address 0x%02x", $data->{driver}, $data->{address} if $is_i2c; - printf "(main: 0x%02x", $data->{main} if (exists $data->{main}); + printf " (main: 0x%02x)", $data->{main} if (exists $data->{main}); print " " if $is_i2c and $is_isa; if ($is_isa) { if ($data->{isa_addr}) {