summaryrefslogtreecommitdiff
path: root/com32/hdt
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2011-04-13 20:42:38 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2011-04-13 20:42:38 +0200
commit86e551c6b5865d11d7118e1eea6fc751a2ab4122 (patch)
tree0c3d76c1acda2317065a2455afed5ecac44c7e40 /com32/hdt
parent07085e57dbd9f0222aa3104c3bb8876d143da10f (diff)
downloadsyslinux-86e551c6b5865d11d7118e1eea6fc751a2ab4122.tar.gz
hdt: Display non-sequentials disks configurations
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.
Diffstat (limited to 'com32/hdt')
-rw-r--r--com32/hdt/hdt-menu-disk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/com32/hdt/hdt-menu-disk.c b/com32/hdt/hdt-menu-disk.c
index b0b4a5ac..6862e042 100644
--- a/com32/hdt/hdt-menu-disk.c
+++ b/com32/hdt/hdt-menu-disk.c
@@ -243,12 +243,12 @@ void compute_disks(struct s_hdt_menu *menu, struct s_hardware *hardware)
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++;
}