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>
static int bls_sort(const struct dirent **ent_a, const struct dirent **ent_b)
{
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,
}
int builtin_blscfg(struct grub2_script *script,