From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1okgDB-0006n8-4L for mharc-grub-devel@gnu.org; Tue, 18 Oct 2022 02:36:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okgCZ-0006cR-Kj for grub-devel@gnu.org; Tue, 18 Oct 2022 02:35:49 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:43840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okgCX-0002BZ-9u for grub-devel@gnu.org; Tue, 18 Oct 2022 02:35:46 -0400 Received: by mail-wr1-x42a.google.com with SMTP id n12so21822022wrp.10 for ; Mon, 17 Oct 2022 23:35:44 -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=2A9S3CXOTCwdn+lDuQPpMAFg52KVpluL8upUmekQkfE=; b=JyMsQR3qIyUWFoQba2C/2+utgcVKN46fWVFxbFVVzSfxcKa2TGDomP3fI0JCcSVpJs 9+SsVv/xbvTqnO5FCZJGGovhFsWNgeoe22zf108esG0Q5LyLPB1OOWVelV5WKpIMFPcT wg01TCcX+GOzUNQYgxtihyLZ+b8JFsAqyE8sGk/JPFipBv3UOt/gpfEV0i6WrgHmoA2b WnqwZsTpogUPTN7pj9pnfuK42rOsj8+zJTyEJp8OyN8u1s/Mjp68H44koyiNH9MgA/J/ WSBUclB9VYsvIWqlTdU1YJNkpWzvsPG/fFu8nzjPCm2g0X+0eC5COXAkMcGcSU9mIlDX wWxw== 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=2A9S3CXOTCwdn+lDuQPpMAFg52KVpluL8upUmekQkfE=; b=uuNNXjHsIsoBcbhfrJG6FBuvjGLQgkCEOqT8B5BSkhBIp11aYC+RQ1LUkwvY0HZePL EmVMQWbQDaAXZkwxD/XOJO5AM5fhvLLuwp4It3JHtY96XguegXk/reABGQEZaEFgf1H/ qxg2TjQn/lyzKkyVQdO7DX7rds9l0+wb4WJJk1LoTyXvtPa0OIgI/FxOJxKQ6ZuDF3aM 9SVboT3jmkdPRVgiheutw/6jBNZ0fU/wD4RxRb2Hz7ZTzIFBTKOgs8paDLfDAmg3bkDC lSc0PKvS0F3Yd8XiDqqcpzuh01ey3gc/7ziPYjRrYJAfWBVa42XBBTipi6FJ2KumMuJr Oq0g== X-Gm-Message-State: ACrzQf1lcpj+eUJENwdk/HltqYUSR9Q3fXG6nKy86Ptt6YzQmPtdY3ZE 2/IFjW/a3BnZg/y/zEENjLvmo+y9OUuYyQ== X-Google-Smtp-Source: AMsMyM4ODs2Al3Bsn4YO641bipvzPdIt/3s/ruCqKG9waOoeXw09qbFzKhhVAQCLRUch6UatcLiWsQ== X-Received: by 2002:a05:6000:1541:b0:231:115e:9bb8 with SMTP id 1-20020a056000154100b00231115e9bb8mr852082wry.51.1666074942570; Mon, 17 Oct 2022 23:35:42 -0700 (PDT) Received: from dj3ntoo (171.sub-72-110-15.myvzw.com. [72.110.15.171]) by smtp.gmail.com with ESMTPSA id g8-20020a7bc4c8000000b003c0d504a92csm16848483wmk.22.2022.10.17.23.35.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 23:35:41 -0700 (PDT) Date: Tue, 18 Oct 2022 01:35:35 -0500 From: Oskari Pirhonen To: grub-devel@gnu.org Cc: Daniel Kiper , mathieu.desnoyers@efficios.com, rharwood@redhat.com, samuel.thibault@ens-lyon.org, debian-bsd@lists.debian.org, xen-devel@lists.xenproject.org, Denton Liu Subject: Re: [PATCH v4] templates: introduce GRUB_TOP_LEVEL_* vars Message-ID: Mail-Followup-To: grub-devel@gnu.org, Daniel Kiper , mathieu.desnoyers@efficios.com, rharwood@redhat.com, samuel.thibault@ens-lyon.org, debian-bsd@lists.debian.org, xen-devel@lists.xenproject.org, Denton Liu References: <20221017103532.845293-1-liu.denton@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hXVz/a4Innggs2yF" Content-Disposition: inline In-Reply-To: <20221017103532.845293-1-liu.denton@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=xxc3ncoredxx@gmail.com; helo=mail-wr1-x42a.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: Tue, 18 Oct 2022 06:35:50 -0000 --hXVz/a4Innggs2yF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 17, 2022 at 03:35:32 -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 --hXVz/a4Innggs2yF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQfOU+JeXjo4uxN6vCp8he9GGIfEQUCY05JMQAKCRCp8he9GGIf EQ0WAP0ZQxLfKP72sWT44WYI+U+sA+CLj0HtNgBM7y1Re5wnBwD8DVQv8NcQ8mkW qUNttUu8qfwYls2ccVNpvEHPvu9jGQE= =gtWi -----END PGP SIGNATURE----- --hXVz/a4Innggs2yF--