libs/sys: better handle bogomips parsing

This commit is contained in:
Jo-Philipp Wich 2011-02-14 15:36:04 +00:00
parent f49fcbd40e
commit 31ebd0e378

View file

@ -175,7 +175,7 @@ function sysinfo()
local memcached = tonumber(meminfo:match("\nCached:%s*(%d+)")) local memcached = tonumber(meminfo:match("\nCached:%s*(%d+)"))
local memfree = tonumber(meminfo:match("MemFree:%s*(%d+)")) local memfree = tonumber(meminfo:match("MemFree:%s*(%d+)"))
local membuffers = tonumber(meminfo:match("Buffers:%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 = local system =
cpuinfo:match("system type\t+: ([^\n]+)") or cpuinfo:match("system type\t+: ([^\n]+)") or