Coding style changes in entropy, load, thermal, uptime.

This commit is contained in:
Adrian C. (anrxc) 2009-08-03 04:33:18 +02:00
parent 09fda0ab05
commit 3fe67d4311
4 changed files with 4 additions and 4 deletions

View File

@ -25,7 +25,7 @@ function worker(format, poolsize)
-- Get available entropy
local f = io.open("/proc/sys/kernel/random/entropy_avail")
local ent_avail = f:read()
local ent_avail = f:read("*line")
f:close()
-- Calculate percentage

View File

@ -17,7 +17,7 @@ module("vicious.load")
function worker(format)
-- Get load averages
local f = io.open('/proc/loadavg')
local line = f:read()
local line = f:read("*line")
f:close()
-- Get load data

View File

@ -17,7 +17,7 @@ module("vicious.thermal")
function worker(format, thermal_zone)
-- Get thermal zone
local f = io.open("/proc/acpi/thermal_zone/" .. thermal_zone .. "/temperature")
local line = f:read()
local line = f:read("*line")
f:close()
-- Get temperature data

View File

@ -20,7 +20,7 @@ module("vicious.uptime")
function worker(format, padding)
-- Get /proc/uptime
local f = io.open("/proc/uptime")
local line = f:read()
local line = f:read("*line")
f:close()
-- Format data