stand/lua: Style pass
These are the style points that I'd like to try and maintain in our lua scripts: - Parentheses around conditionals - Trailing semicolons, except on block terminators - s:method(...) instead of string.method(s, ...) where applicable There's likely more, but that'll get hammered out as we continue.
This commit is contained in:
+8
-8
@@ -128,13 +128,13 @@ function core.kernelList()
|
||||
|
||||
local kernels = {};
|
||||
local i = 0;
|
||||
if k ~= nil then
|
||||
if (k ~= nil) then
|
||||
i = i + 1;
|
||||
kernels[i] = k;
|
||||
end
|
||||
|
||||
for n in v:gmatch("([^; ]+)[; ]?") do
|
||||
if n ~= k then
|
||||
if (n ~= k) then
|
||||
i = i + 1;
|
||||
kernels[i] = n;
|
||||
end
|
||||
@@ -160,23 +160,23 @@ end
|
||||
function core.bootserial()
|
||||
local c = loader.getenv("console");
|
||||
|
||||
if c ~= nil then
|
||||
if c:find("comconsole") ~= nil then
|
||||
if (c ~= nil) then
|
||||
if (c:find("comconsole") ~= nil) then
|
||||
return true;
|
||||
end
|
||||
end
|
||||
|
||||
local s = loader.getenv("boot_serial");
|
||||
if s ~= nil then
|
||||
if (s ~= nil) then
|
||||
return true;
|
||||
end
|
||||
|
||||
local m = loader.getenv("boot_multicons");
|
||||
if m ~= nil then
|
||||
if (m ~= nil) then
|
||||
return true;
|
||||
end
|
||||
return false;
|
||||
end
|
||||
|
||||
core.setACPI(core.getACPIPresent(false))
|
||||
return core
|
||||
core.setACPI(core.getACPIPresent(false));
|
||||
return core;
|
||||
|
||||
Reference in New Issue
Block a user