projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f49fcbd
)
libs/sys: better handle bogomips parsing
author
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 14 Feb 2011 15:36:04 +0000
(15:36 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Mon, 14 Feb 2011 15:36:04 +0000
(15:36 +0000)
libs/sys/luasrc/sys.lua
patch
|
blob
|
history
diff --git
a/libs/sys/luasrc/sys.lua
b/libs/sys/luasrc/sys.lua
index 2819c338e771125deecfad0268c3ee134089ae2d..2bdc15ecb91dc9d5be64f4ae9872bd0597f24acc 100644
(file)
--- 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