Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1ogfb8-0004Xi-Ey for mharc-grub-devel@gnu.org; Fri, 07 Oct 2022 01:08:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogfb5-0004Vl-EZ for grub-devel@gnu.org; Fri, 07 Oct 2022 01:08:31 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:51721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogfb3-0006P4-Tk for grub-devel@gnu.org; Fri, 07 Oct 2022 01:08:31 -0400 Received: by mail-wm1-x32b.google.com with SMTP id o5so2219859wms.1 for ; Thu, 06 Oct 2022 22:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=phZuOVV/zIWx07fxUwJj8DIg3ht65/Tebje3u/Mwwp4=; b=ORuEG+6tlWNDDBxIxrryjZ99yuE2iw79+B0yWTKfFox0N/Q6F4jSJcX/D8zJZM2ban /oe8glZvLXSEJW4qZD/JV4WRtYy73gu1T+BLecpAnfj4BtU6H37k1bpikQAU709uE6oR obxWy9hKJeYG4nL/g94/AE4gPSFobxQ3KI1B1f3MLli0cp4MEOby5+DKi1awo9G6itsf EZmsM4oJi7RQUbQBj8H6smpbm3EK3rLcQLFGqrqBAkjKkLRuEEUZCcx1z5FwJMxuJ6lY NTK9rX7Nb91HER4OjuPsfnhbSt5iDZkmUii9RrNkdiNHDsMaFIvTy9V7sCcpqDMLY3QI jSiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=phZuOVV/zIWx07fxUwJj8DIg3ht65/Tebje3u/Mwwp4=; b=HG7Dgz24siUL3J/gaB7kOU8WMselCrVl9V/DJhkQd4CtZp9xHwYSRzEMghbcabthnx EMKhjeQk27uEqAxSWlGW6aFHBGOa05JnDI7ov/uOaGATtEg+ccw34w9J0tzhintuuilT PN4ZYqVyvHfw7hAn0Eoq+rVrVTxyT4vczEAyc5jsbW7FYn5ASjz/V6IX8tjuh0rPbSBu X9Npi3uPydSNsV91CfRQqkcW3oN6xWHbNKLe+MIJJ3BYYzl14zZYS4PPP3/2GYUtto+z +cRgpoMnvleHbjSzFzqPmeJp/ydNfiycfWHqRL8SFsrZOA+Tu8JUfvf14Y2mYqCWqoTf OBPw== X-Gm-Message-State: ACrzQf1PSPCDioFxbt6Co1urbrm1j8iHGRmU0mzxqEEHmr5bPTUiRCAt Be0CFfNz5sSPEF+cCbYtaZz5IikX12U= X-Google-Smtp-Source: AMsMyM5KwvP4BJsB+Dyy9xrljIyRwso4IfQ8dL1TFObpdrGhoh2T82GB/+582g7T5Wpv7B2HxLy0PA== X-Received: by 2002:a7b:cc15:0:b0:3b4:ca90:970d with SMTP id f21-20020a7bcc15000000b003b4ca90970dmr1933492wmh.198.1665119307616; Thu, 06 Oct 2022 22:08:27 -0700 (PDT) Received: from dj3ntoo (171.sub-72-110-15.myvzw.com. [72.110.15.171]) by smtp.gmail.com with ESMTPSA id m11-20020adfdc4b000000b0022e6da05e43sm975027wrj.89.2022.10.06.22.08.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 22:08:26 -0700 (PDT) Date: Fri, 7 Oct 2022 00:08:21 -0500 From: Oskari Pirhonen To: grub-devel@gnu.org Cc: Daniel Kiper , Denton Liu Subject: Re: [PATCH v3] templates: introduce GRUB_TOP_LEVEL_* vars Message-ID: Mail-Followup-To: grub-devel@gnu.org, Daniel Kiper , Denton Liu References: <20220930111111.67328-1-liu.denton@gmail.com> <20221005092238.213506-1-liu.denton@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GtClFb0lc5btfnDE" Content-Disposition: inline In-Reply-To: <20221005092238.213506-1-liu.denton@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=xxc3ncoredxx@gmail.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2022 05:08:31 -0000 --GtClFb0lc5btfnDE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 05, 2022 at 02:22:38 -0700, Denton Liu wrote: > A user may wish to use an image that is not sorted as the "latest" > version as the top-level entry. For example, in Arch Linux, if a user > has the LTS and regular kernels installed, `/boot/vmlinuz-linux-lts` > gets sorted as the "latest" compared to `/boot/vmlinuz-linux`. However, > a user may wish to use the regular kernel as the default with the LTS > only existing as a backup. >=20 > Introduce the GRUB_TOP_LEVEL, GRUB_TOP_LEVEL_XEN and > GRUB_TOP_LEVEL_OS_PROBER variables to allow users to specify the > top-level entry. >=20 > Create grub_move_to_front() as a helper function which moves entries to > the front of a list. This function does the heavy lifting of moving > the menu entry to the front in each script. >=20 > In 10_netbsd, since there isn't an explicit list variable, extract the > items that are being iterated through into a list so that we can > optionally apply grub_move_to_front() to the list before the loop. >=20 > Signed-off-by: Denton Liu Reviewed-by: Oskari Pirhonen I've tested it on Linux, but the other platforms and os-prober are still untested. - Oskari --GtClFb0lc5btfnDE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQfOU+JeXjo4uxN6vCp8he9GGIfEQUCYz+0QAAKCRCp8he9GGIf ESZEAP0ceCllqExAtAKkPeH4LtIr8KVGW3Sb15iY4Q1rNwfpCQEAuvtbCGsTHHGF vGic3Sq8RPqNsnfH6LwjlSwfxxXf2A4= =F6Ru -----END PGP SIGNATURE----- --GtClFb0lc5btfnDE--