From owner-svn-src-head@freebsd.org Tue Feb 27 22:07:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20222F2DD8B; Tue, 27 Feb 2018 22:07:42 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8E4173458; Tue, 27 Feb 2018 22:07:41 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C3BD710A26; Tue, 27 Feb 2018 22:07:41 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1RM7fsG044356; Tue, 27 Feb 2018 22:07:41 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1RM7f2P044355; Tue, 27 Feb 2018 22:07:41 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201802272207.w1RM7f2P044355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 27 Feb 2018 22:07:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330088 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 330088 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2018 22:07:42 -0000 Author: kevans Date: Tue Feb 27 22:07:41 2018 New Revision: 330088 URL: https://svnweb.freebsd.org/changeset/base/330088 Log: lualoader: Correct test sense, comments, and add some more comments Modified: head/stand/lua/config.lua Modified: head/stand/lua/config.lua ============================================================================== --- head/stand/lua/config.lua Tue Feb 27 22:02:39 2018 (r330087) +++ head/stand/lua/config.lua Tue Feb 27 22:07:41 2018 (r330088) @@ -333,6 +333,9 @@ function config.loadmod(mod, silent) return status end +-- Returns true if we processed the file successfully, false if we did not. +-- If 'silent' is true, being unable to read the file is not considered a +-- failure. function config.processFile(name, silent) if silent == nil then silent = false @@ -340,15 +343,13 @@ function config.processFile(name, silent) local text = readFile(name, silent) if text == nil then - return not silent + return silent end return config.parse(text) end -- silent runs will not return false if we fail to open the file --- check_and_halt, if it's set, will be executed on the full text of the config --- file. If it returns false, we are to halt immediately. function config.parse(text) local n = 1 local status = true