summaryrefslogtreecommitdiffhomepage
path: root/libs/sys/luasrc/sys.lua
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-02-14 15:36:04 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-02-14 15:36:04 +0000
commit31ebd0e37820c3a890a69dead01edecd5d91ad9d (patch)
tree999c554487b1acf1cb99c8e28f87e7cad5103833 /libs/sys/luasrc/sys.lua
parentf49fcbd40e8727195488577e59b76caaac2b7b24 (diff)
libs/sys: better handle bogomips parsing
Diffstat (limited to 'libs/sys/luasrc/sys.lua')
-rw-r--r--libs/sys/luasrc/sys.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua
index 2819c338e7..2bdc15ecb9 100644
--- a/libs/sys/luasrc/sys.lua
+++ b/libs/sys/luasrc/sys.lua
@@ -175,7 +175,7 @@ function sysinfo()
local memcached = tonumber(meminfo:match("\nCached:%s*(%d+)"))
local memfree = tonumber(meminfo:match("MemFree:%s*(%d+)"))
local membuffers = tonumber(meminfo:match("Buffers:%s*(%d+)"))
- local bogomips = tonumber(cpuinfo:match("BogoMIPS.-:%s*([^\n]+)"))
+ local bogomips = tonumber(cpuinfo:match("[Bb]ogo[Mm][Ii][Pp][Ss].-: ([^\n]+)")) or 0
local system =
cpuinfo:match("system type\t+: ([^\n]+)") or