From a900525440406397c8a2da158f1f5b716ca07389 Mon Sep 17 00:00:00 2001 From: Frodo Looijaard Date: Mon, 1 Mar 1999 13:27:57 +0000 Subject: [PATCH] Solved i2c_sub_addrs not being printed problem (I hope) git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@285 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/detect/detect.pl | 3 ++- prog/detect/sensors-detect | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/prog/detect/detect.pl b/prog/detect/detect.pl index 1ce76c67..2dd67ff5 100755 --- a/prog/detect/detect.pl +++ b/prog/detect/detect.pl @@ -946,7 +946,8 @@ sub scan_adapter i2c_driver => $adapter_driver, i2c_devnr => $adapter_nr, }; - $new_hash->{i2c_sub_addrs} = \@chips if (@chips); + my @chips_copy = @chips, $new_hash->{i2c_sub_addrs} = \@chips_copy + if (@chips); add_i2c_to_chips_detected $$chip{driver}, $new_hash; } else { print "Failed!\n"; diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 1ce76c67..2dd67ff5 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -946,7 +946,8 @@ sub scan_adapter i2c_driver => $adapter_driver, i2c_devnr => $adapter_nr, }; - $new_hash->{i2c_sub_addrs} = \@chips if (@chips); + my @chips_copy = @chips, $new_hash->{i2c_sub_addrs} = \@chips_copy + if (@chips); add_i2c_to_chips_detected $$chip{driver}, $new_hash; } else { print "Failed!\n";