From: Erwan Velu Date: Wed, 13 Apr 2011 18:42:38 +0000 (+0200) Subject: hdt: Display non-sequentials disks configurations X-Git-Tag: syslinux-4.05-pre1~20^2~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86e551c6b5865d11d7118e1eea6fc751a2ab4122;p=profile%2Fivi%2Fsyslinux.git 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. --- diff --git a/com32/hdt/hdt-menu-disk.c b/com32/hdt/hdt-menu-disk.c index b0b4a5a..6862e04 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++; }