From 08fad16d2287c22d8bd465539effa634984f4f92 Mon Sep 17 00:00:00 2001 From: "Mark D. Studebaker" Date: Thu, 21 Nov 2002 23:43:05 +0000 Subject: [PATCH] print some help and exit if no sensors found. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1640 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/detect/sensors-detect | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index 4bf1f9f5..e34eed2c 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -1042,7 +1042,7 @@ use subs qw(mtp008_detect lm78_detect lm78_isa_detect lm78_alias_detect isa_detect => sub { ipmi_smic_detect @_ }, }, { - name => "SMart Battery", + name => "Smart Battery", driver => "smartbatt", i2c_addrs => [0x0b], i2c_detect => sub { smartbatt_detect @_}, @@ -3201,6 +3201,18 @@ sub main } } + if(! @chips_detected) { + print "\n Sorry, no chips were detected.\n", + " Either your sensors are not supported, or they are\n", + " connected to an I2C bus adapter that we do not support.\n", + " See doc/FAQ, doc/lm_sensors-FAQ.html, or\n", + " http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/doc/lm_sensors-FAQ.html\n", + " (FAQ #4.24.3) for further information.\n", + " If you find out what chips are on your board, see\n", + " http://secure.netroedge.com/~lm78/newdrivers.html for driver status.\n"; + exit; + } + print "\n Now follows a summary of the probes I have just done.\n"; print " Just press ENTER to continue: "; ;