Author: kevans
Date: Fri Feb 16 03:14:23 2018
New Revision: 329350
URL: https://svnweb.freebsd.org/changeset/base/329350

Log:
  stand/lua: Don't descend into an empty kernels submenu
  
  This submenu is likely going to go away in favor of kernel selection as it
  is done in forth at the moment, but for the time being don't descend into it
  if we have no kernels available for listing.

Modified:
  head/stand/lua/menu.lua

Modified: head/stand/lua/menu.lua
==============================================================================
--- head/stand/lua/menu.lua     Fri Feb 16 03:12:24 2018        (r329349)
+++ head/stand/lua/menu.lua     Fri Feb 16 03:14:23 2018        (r329350)
@@ -218,6 +218,9 @@ menu.welcome = {
 
                        -- dynamically build the kernel menu:
                        local kernels = core.kernelList();
+                       if #kernels == 0 then
+                               return nil;
+                       end
                        for k, v in ipairs(kernels) do
                                menu.kernel_options[#menu.kernel_options + 1] = 
{
                                        entry_type = "entry",
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to