From nobody Thu Jan 09 07:12:05 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YTGF15hBjz5kDgq; Thu, 09 Jan 2025 07:12:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YTGF14HfDz4Nkn; Thu, 9 Jan 2025 07:12:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736406725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Um7q03KNGIiYAOME3INc+0DZMEpIJ9SJBN3mCTAZSbc=; b=IHQhFkcxfH88Se+vc8BBDpuRU7816SLiKvT54xkwC0Vavoqse/KYEGORgHxVYLHhSXpuEO Et7e7sxgsHaa33aieE3P94gJjzYDAc0Jg+Nf7n9G7lkiI5B+P8VSFq954F1oc9po8vo7fT nlhW5zG6Xf04LIhBYHcuBxNpsppY9YLSmVRhSSWfUR0nrL1wS5ShWh/0fOe0OqOCahzOfa RTMWlxp553DL8FjePuNDqqWHduFeWFqBNIAAmsDPtk18hN1tKL1sy9BfjAGBTiouPPX293 oXAn+n+G6bPyP5GfxeybgcRqA6dxfSmMLWxCq4TH9l/ReVoVTiIzTggsRfn5jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736406725; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Um7q03KNGIiYAOME3INc+0DZMEpIJ9SJBN3mCTAZSbc=; b=yEXgVYtn/xpAtfXqDMEAr0kTuHV9Orn97YUYS7Wom9KTDxS3i1VFN1+ephi6/9V307KZDn keMHpnZA1TbY+G1AAF16TR3oO+ZzeWTkd2VbexotrdyeFF5yF/QegI4k8CnA0y2w/rXWgt VOzjOl+/inmRbzF4C5HlnIAtU461CAXbF2hYuyvykbHSEYHEbL71HTSYLqTKig/8lwU1lD ZvBd3RM6dQWOOCTzUX/iD199uokgcT6soMCWuVef1Kds0FDMs77HegGs39g58xRh4m1//v VHZ7/bKPUYw9C1+7VsZBce7ETHwNCp3wwDYfX7bjwfErrJ1DuwvLv9pIuUXgMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736406725; a=rsa-sha256; cv=none; b=EjLbDtZ5fbZjtTVXI4NwsMhawIWgX+KhvvHGnIVfI6qWQeVKBqdwZkCQxy3LhJ9gUhUrdb wKf+GAS7hHseA69ln+kYDAs1cTm4/v/FVOML2lUfKiBj7w1ykUpuvbKchzJGVeQgAc0CIW mYPUWEaTeuUgdqy+6HpKKkng/k/x7h+4y2MP+2JsHqey9q4BKPkX6o7rbvH51svn3/z7Vj En6IxKL9AZk/nF+yJ0PC8KqYkN7SJVL81zZ6AThTICuruN8LxqTDlnhAWj8fjQqCNcXSBq nrhE9Tp1UL4HjcIGI6cLn8wLXs20TakX72o4bFF6DhG5ZdqKnfG/FpcLyH7rHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YTGF13tz2z1d9; Thu, 09 Jan 2025 07:12:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5097C5xY082951; Thu, 9 Jan 2025 07:12:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5097C5aW082937; Thu, 9 Jan 2025 07:12:05 GMT (envelope-from git) Date: Thu, 9 Jan 2025 07:12:05 GMT Message-Id: <202501090712.5097C5aW082937@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: ee233742a569 - main - loader: Rework kernel menu section List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ee233742a5697f64d0f1d722b5e73ff2c5998c62 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ee233742a5697f64d0f1d722b5e73ff2c5998c62 commit ee233742a5697f64d0f1d722b5e73ff2c5998c62 Author: Emmanuel Vadot AuthorDate: 2025-01-07 09:34:35 +0000 Commit: Emmanuel Vadot CommitDate: 2025-01-09 07:13:43 +0000 loader: Rework kernel menu section With pkgbase we can have long kernel name, so create a new section for the kernel name. Do not show the "default" text, we already show the "1 of X" part at the end of the line and the default kernel is always number 1 so it's a bit redundant. Differential Revision: https://reviews.freebsd.org/D48354 Reviewed by: imp, tsoome Sponsored by: Beckhoff Automation GmbH & Co. KG --- stand/lua/menu.lua | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/stand/lua/menu.lua b/stand/lua/menu.lua index 2d92be3b7c6e..7c36b6c8d3c8 100644 --- a/stand/lua/menu.lua +++ b/stand/lua/menu.lua @@ -255,9 +255,16 @@ menu.welcome = { }, { entry_type = core.MENU_SEPARATOR, - name = "Options:", + name = "Kernel:", }, menu_entries.kernel_options, + { + entry_type = core.MENU_SEPARATOR, + }, + { + entry_type = core.MENU_SEPARATOR, + name = "Options:", + }, menu_entries.boot_options, menu_entries.zpool_checkpoints, menu_entries.boot_envs, @@ -332,22 +339,19 @@ menu.welcome = { items = core.kernelList, name = function(idx, choice, all_choices) if #all_choices == 0 then - return "Kernel: " + return "" end - local is_default = (idx == 1) - local kernel_name = "" + local kernel_name local name_color - if is_default then + if idx == 1 then name_color = color.escapefg(color.GREEN) - kernel_name = "default/" else name_color = color.escapefg(color.CYAN) end - kernel_name = kernel_name .. name_color .. - choice .. color.resetfg() - return color.highlight("K") .. "ernel: " .. - kernel_name .. " (" .. idx .. " of " .. + kernel_name = name_color .. choice .. + color.resetfg() + return kernel_name .. " (" .. idx .. " of " .. #all_choices .. ")" end, func = function(_, choice, _)