diff --git a/CHANGES b/CHANGES index a4b00582..ac3bd0a3 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,7 @@ lm-sensors CHANGES file ----------------------- SVN HEAD + pwmconfig: Better diagnostics in pwmdisable sensors-detect: Add Texas Instruments TMP401 detection Mention the f75375s driver Add SMSC LPC47B367-NC detection (no sensors) diff --git a/prog/pwm/pwmconfig b/prog/pwm/pwmconfig index 3ac750f3..51b9e8c3 100755 --- a/prog/pwm/pwmconfig +++ b/prog/pwm/pwmconfig @@ -132,15 +132,21 @@ function pwmdisable() # It didn't work, try pwmN_enable=1 pwmN=255 echo 1 > $ENABLE 2> /dev/null + if [ "`cat $ENABLE`" -ne 1 ] + then + echo "$ENABLE stuck to `cat $ENABLE`" >&2 + return 1 + fi + echo $MAX > $1 - if [ "`cat $ENABLE`" -eq 1 -a "`cat $1`" -ge 190 ] + if [ "`cat $1`" -ge 190 ] then # Success return 0 fi # Nothing worked - echo "$ENABLE stuck to `cat $ENABLE`" >&2 + echo "$1 stuck to `cat $1`" >&2 return 1 else echo $MAX 0 > $1