diff --git a/entropy.lua b/entropy.lua index a41fb38..c9b798d 100644 --- a/entropy.lua +++ b/entropy.lua @@ -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 diff --git a/load.lua b/load.lua index cce1388..a8d6971 100644 --- a/load.lua +++ b/load.lua @@ -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 diff --git a/thermal.lua b/thermal.lua index 8d4057a..d84d3f3 100644 --- a/thermal.lua +++ b/thermal.lua @@ -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 diff --git a/uptime.lua b/uptime.lua index 82cb20a..fc8c97f 100644 --- a/uptime.lua +++ b/uptime.lua @@ -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