cpu: simplified CPU identification

This commit is contained in:
Adrian C. (anrxc) 2009-10-07 22:06:27 +02:00
parent e252fd955a
commit 0eea1a1bb6
1 changed files with 2 additions and 4 deletions

View File

@ -34,12 +34,10 @@ local function worker(format)
for line in f:lines() do
if string.find(line, "^cpu") then
if #cpu_lines < 1 then cpuid = 1
else cpuid = #cpu_lines + 1 end
cpu_lines[#cpu_lines+1] = {}
cpu_lines[cpuid] = {}
for i in string.gmatch(line, "[%s]+([%d]+)") do
table.insert(cpu_lines[cpuid], i)
table.insert(cpu_lines[#cpu_lines], i)
end
end
end