From c6e933999baa5424a2e6976a98c488e69b973b48 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Wed, 16 Mar 2016 10:08:41 +0000 Subject: [PATCH] fix diag screen error on HD model git-svn-id: file:///root/webif/svn/pkg/webif/trunk@2749 2a923420-c742-0410-a762-8d5b09965624 --- CONTROL/control | 2 +- webif/html/diag/disk.jim | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index 961a7cae..8d9b83db 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.2.8-9 +Version: 1.2.8-10 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: tcpfix,webif-channelicons(>=1.1.20),lighttpd(>=1.4.39-1),jim(>=0.76),jim-oo,jim-sqlite3(>=0.76),jim-cgi(>=0.7),jim-binary(>=0.76),service-control(>=2.1),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.1),hmt(>=2.0.9),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7) diff --git a/webif/html/diag/disk.jim b/webif/html/diag/disk.jim index a798359c..59308355 100755 --- a/webif/html/diag/disk.jim +++ b/webif/html/diag/disk.jim @@ -132,7 +132,9 @@ foreach line [split [exec /bin/smartctl -A $device] "\n"] { set notes "" set left [expr 100 - 100 * (100 - $val) / (100 - $thresh)] if {$left < 10} { set class orangeshade } - if {$rval > 0 && [dict exists $derive $id]} { + # rval can be non-numeric (e.g. 6078h+41m+22.260s) + if {[regexp {^\d+$} $rval] && $rval > 0 && [\ + dict exists $derive $id]} { if {$left < 100} { set total [expr \ round(($rval / (100 - $left) * 100) \