If the location of the disks wasn't sequential on the system, the menu
mode was missing some.
This commit fix ticket #46.
Thanks gerth for reporting.
if (hardware->disks_count == 0)
return;
- for (int i = 0; i < hardware->disks_count; i++) {
- if (!hardware->disk_info[i].cbios)
+ for (int drive = 0x80; drive < 0xff; drive++) {
+ if (!hardware->disk_info[drive - 0x80].cbios)
continue; /* Invalid geometry */
compute_disk_module
((struct s_my_menu *)&(menu->disk_sub_menu), nb_sub_disk_menu,
- hardware, i);
+ hardware, drive - 0x80);
nb_sub_disk_menu++;
}