From owner-svn-src-all@freebsd.org Fri Feb 16 22:57:52 2018 Return-Path: Delivered-To: svn-src-all@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 DD46AF1A65E; Fri, 16 Feb 2018 22:57:52 +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 9015376D61; Fri, 16 Feb 2018 22:57:52 +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 8AFCF14157; Fri, 16 Feb 2018 22:57:52 +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 w1GMvqcN084676; Fri, 16 Feb 2018 22:57:52 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1GMvqBN084675; Fri, 16 Feb 2018 22:57:52 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201802162257.w1GMvqBN084675@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 16 Feb 2018 22:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329415 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 329415 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Feb 2018 22:57:53 -0000 Author: kevans Date: Fri Feb 16 22:57:52 2018 New Revision: 329415 URL: https://svnweb.freebsd.org/changeset/base/329415 Log: stand/lua: Don't reload kernel config if we only have one kernel Don't move this into config.reload because we may want to force reloads if /boot changes out from under us later. As a caution: changing kernels in lualoader at the moment might not be loading all of your modules (in my testing, at least) from loader.conf(5). This is a known problem. Modified: head/stand/lua/menu.lua Modified: head/stand/lua/menu.lua ============================================================================== --- head/stand/lua/menu.lua Fri Feb 16 22:51:08 2018 (r329414) +++ head/stand/lua/menu.lua Fri Feb 16 22:57:52 2018 (r329415) @@ -213,8 +213,10 @@ menu.welcome = { " (" .. idx .. " of " .. #all_choices .. ")"; end, - func = function(choice) - config.reload(choice); + func = function(choice, all_choices) + if (#all_choices > 1) then + config.reload(choice); + end end, alias = {"k", "K"} }, @@ -300,7 +302,8 @@ function menu.run(m) if (#choices > 0) then caridx = (caridx % #choices) + 1; menu.setCarouselIndex(carid, caridx); - sel_entry.func(choices[caridx]); + sel_entry.func(choices[caridx], + choices); end elseif (sel_entry.entry_type == core.MENU_SUBMENU) then -- recurse