Cleanup eye-gouging madness around io.read calls (#7149)

* Don't reinvent the wheel when reading a one-line int or string from sysfs

* Simplify a whole other bunch of read calls
This commit is contained in:
NiLuJe
2021-01-16 04:41:46 +01:00
committed by GitHub
parent f52fffd467
commit dffe86dfe9
17 changed files with 36 additions and 68 deletions

View File

@@ -227,7 +227,7 @@ describe("device module", function()
}
elseif filename == "/sys/class/backlight/max77696-bl/brightness" then
return {
read = function() return "12" end,
read = function() return 12 end,
close = function() end
}
else