if no entries are found, select the first one not the last one of the auto-* entries
authorKay Sievers <kay@vrfy.org>
Wed, 6 Mar 2013 19:31:10 +0000 (20:31 +0100)
committerKay Sievers <kay@vrfy.org>
Wed, 6 Mar 2013 19:31:10 +0000 (20:31 +0100)
src/efi/gummiboot.c

index 47b5362..6fc1026 100644 (file)
@@ -1559,7 +1559,7 @@ static VOID config_default_entry_select(Config *config) {
                 }
         }
 
-        /* select the last entry */
+        /* select the last suitable entry */
         i = config->entry_count;
         while (i--) {
                 if (config->entries[i]->no_autoselect)
@@ -1567,8 +1567,6 @@ static VOID config_default_entry_select(Config *config) {
                 config->idx_default = i;
                 return;
         }
-
-        config->idx_default = config->entry_count-1;
 }
 
 /* generate a unique title, avoiding non-distinguishable menu entries */