diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-10-07 22:06:27 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-10-07 22:06:27 +0200 |
commit | 0eea1a1bb6fc1315f0f634881d1e94bb18e915c2 (patch) | |
tree | f91c545ec6bd420ef58b0f758bfb4c9a1f75aeb2 /cpu.lua | |
parent | e252fd955ab7da046e83910f1909ab9deed0dc81 (diff) | |
download | vicious-legacy-0eea1a1bb6fc1315f0f634881d1e94bb18e915c2.tar.xz |
cpu: simplified CPU identification
Diffstat (limited to 'cpu.lua')
-rw-r--r-- | cpu.lua | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 |