Skip to content

Commit

Permalink
Sort boot entries
Browse files Browse the repository at this point in the history
  • Loading branch information
citrus-it committed Jul 8, 2022
1 parent 6ddc403 commit bdd2d25
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/efi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ impl Default for AuthVariable {

impl Volume {
pub fn boot_entries(&self) -> BootEntryIter {
// XXX - just store the iterator in the struct?
let mut vars: Vec<&AuthVariable> = self
.vars
.iter()
Expand All @@ -270,7 +269,7 @@ impl Volume {
== EFI_GLOBAL_VARIABLE_GUID.to_string()
})
.collect();
vars.reverse();
vars.sort_by(|a, b| b.name.partial_cmp(&a.name).unwrap());
BootEntryIter { vars }
}

Expand Down

0 comments on commit bdd2d25

Please sign in to comment.