summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javierm@redhat.com>2018-04-17 19:08:58 +0200
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-04-18 11:10:41 +1000
commit73bcd24e9a96468b81395e7f57d3568e5d1f7dd3 (patch)
tree8c55406eb5c826e018c51b8e1cfe68a2a161324f
parentd01dfd5a6ca8283939265875dc69d665f955aba2 (diff)
downloadtalos-petitboot-73bcd24e9a96468b81395e7f57d3568e5d1f7dd3.zip
talos-petitboot-73bcd24e9a96468b81395e7f57d3568e5d1f7dd3.tar.gz
discover/grub: Reverse BLS entries sorting to match Petitboot's boot order
The BLS entries were sorted so that the latest entry was at the top in the Petitboot UI, since it matches how menu entries are sorted in GRUB2 config and the GRUB2 UI. But in the Petitboot's UI, the latest entry is expected to be at the bottom and the older one at the top. Sort the BLS entries to match what's expected. Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
-rw-r--r--discover/grub2/blscfg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/discover/grub2/blscfg.c b/discover/grub2/blscfg.c
index 02ac621..d20dde2 100644
--- a/discover/grub2/blscfg.c
+++ b/discover/grub2/blscfg.c
@@ -162,7 +162,7 @@ static int bls_filter(const struct dirent *ent)
static int bls_sort(const struct dirent **ent_a, const struct dirent **ent_b)
{
- return strverscmp((*ent_b)->d_name, (*ent_a)->d_name);
+ return strverscmp((*ent_a)->d_name, (*ent_b)->d_name);
}
int builtin_blscfg(struct grub2_script *script,
OpenPOWER on IntegriCloud