mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-10-31 13:10:30 +00:00
Don't choke on missing name attribute. Drivers shouldn't do that, but
we can live without the name attribute, so there's no point in failing. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5345 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
66130a9630
commit
5f269d0f10
1 file changed
+5
-1
+5
-1
@@ -151,9 +151,13 @@ fi
|
||||
# Only works with Linux 2.6
|
||||
function print_devices()
|
||||
{
|
||||
local name
|
||||
|
||||
for device in $DEVICES
|
||||
do
|
||||
echo "$1$device is `cat $device/name`"
|
||||
name=`cat $device/name 2> /dev/null`
|
||||
[ -z "$name" ] && name="unknown (no name attribute)"
|
||||
echo "$1$device is $name"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user