Date: Wed, 21 Feb 2018 01:39:33 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329687 - head/stand/lua Message-ID: <201802210139.w1L1dX78010187@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Wed Feb 21 01:39:33 2018 New Revision: 329687 URL: https://svnweb.freebsd.org/changeset/base/329687 Log: lualoader: Drop explicit boolean tests; b or not b Modified: head/stand/lua/config.lua head/stand/lua/core.lua head/stand/lua/menu.lua Modified: head/stand/lua/config.lua ============================================================================== --- head/stand/lua/config.lua Wed Feb 21 01:37:22 2018 (r329686) +++ head/stand/lua/config.lua Wed Feb 21 01:39:33 2018 (r329687) @@ -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 Modified: head/stand/lua/core.lua ============================================================================== --- head/stand/lua/core.lua Wed Feb 21 01:37:22 2018 (r329686) +++ head/stand/lua/core.lua Wed Feb 21 01:39:33 2018 (r329687) @@ -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") Modified: head/stand/lua/menu.lua ============================================================================== --- head/stand/lua/menu.lua Wed Feb 21 01:37:22 2018 (r329686) +++ head/stand/lua/menu.lua Wed Feb 21 01:39:33 2018 (r329687) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802210139.w1L1dX78010187>