]> git.ipfire.org Git - thirdparty/grub.git/commit
templates/linux_xen: Fix XSM entries generation
authorAnthony PERARD <anthony.perard@citrix.com>
Mon, 11 Sep 2023 13:43:45 +0000 (14:43 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Fri, 22 Sep 2023 16:38:36 +0000 (18:38 +0200)
commitdb1faedccdce3cf83336155a95c04a8db03744c5
tree9b14be6a25d9fde761ed2c806b0902ef2aa256f4
parent3335591c6420ae373a24a4dc8f71d661b1fa3090
templates/linux_xen: Fix XSM entries generation

It turns out that setting $xen_version in linux_entry_xsm() override
$xen_version in the loop over $reverse_sorted_xen_list. This means
that only one entry per Xen version is going to enable XSM, but all
further entries are going to have "(XSM enabled)" in their titles
without enabling XSM.

When a "xenpolicy-$xen_version" file was found for the current
$xen_version, it would overwrite $xen_version to add "(XSM enabled)" to
the menu entry title. Once updated, the next call to linux_entry_xsm()
would also have this modified $xen_version and would look for the file
"xenpolicy-*(XSM enabled)" and fail.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/grub.d/20_linux_xen.in