lualoader: Drop explicit boolean tests; b or not b
This commit is contained in:
parent
b67fcf0b57
commit
4955048946
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329687
@ -315,7 +315,7 @@ function config.parse(name, silent)
|
||||
end
|
||||
end
|
||||
|
||||
if found == false then
|
||||
if not found then
|
||||
print("Malformed line (" .. n .. "):\n\t'" ..
|
||||
line .. "'")
|
||||
status = false
|
||||
|
@ -106,7 +106,7 @@ function core.setVerbose(b)
|
||||
b = not core.verbose
|
||||
end
|
||||
|
||||
if b == true then
|
||||
if b then
|
||||
loader.setenv("boot_verbose", "YES")
|
||||
else
|
||||
loader.unsetenv("boot_verbose")
|
||||
@ -119,7 +119,7 @@ function core.setSingleUser(b)
|
||||
b = not core.su
|
||||
end
|
||||
|
||||
if b == true then
|
||||
if b then
|
||||
loader.setenv("boot_single", "YES")
|
||||
else
|
||||
loader.unsetenv("boot_single")
|
||||
@ -131,7 +131,7 @@ function core.getACPIPresent(checkingSystemDefaults)
|
||||
local c = loader.getenv("hint.acpi.0.rsdp")
|
||||
|
||||
if c ~= nil then
|
||||
if checkingSystemDefaults == true then
|
||||
if checkingSystemDefaults then
|
||||
return true
|
||||
end
|
||||
-- Otherwise, respect disabled if it's set
|
||||
@ -146,7 +146,7 @@ function core.setACPI(b)
|
||||
b = not core.acpi
|
||||
end
|
||||
|
||||
if b == true then
|
||||
if b then
|
||||
loader.setenv("acpi_load", "YES")
|
||||
loader.setenv("hint.acpi.0.disabled", "0")
|
||||
loader.unsetenv("loader.acpi_disabled_by_user")
|
||||
@ -162,7 +162,7 @@ function core.setSafeMode(b)
|
||||
if b == nil then
|
||||
b = not core.sm
|
||||
end
|
||||
if b == true then
|
||||
if b then
|
||||
loader.setenv("kern.smp.disabled", "1")
|
||||
loader.setenv("hw.ata.ata_dma", "0")
|
||||
loader.setenv("hw.ata.atapi_dma", "0")
|
||||
|
@ -411,7 +411,7 @@ function menu.skip()
|
||||
end
|
||||
|
||||
function menu.autoboot()
|
||||
if menu.already_autoboot == true then
|
||||
if menu.already_autoboot then
|
||||
return
|
||||
end
|
||||
menu.already_autoboot = true
|
||||
|
Loading…
Reference in New Issue
Block a user