aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2011-09-22 20:52:49 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2011-09-22 20:52:49 +0200
commit6e5e4d01cefda41da506c0c184f54e78796b37d1 (patch)
treeebc3981195df5f8ea0a74a53dac88a0171027614 /com32/hdt
parent7e301945d8a3d5b99fbac741a769e6dc15d527f9 (diff)
downloadsyslinux-6e5e4d01cefda41da506c0c184f54e78796b37d1.tar.gz
syslinux-6e5e4d01cefda41da506c0c184f54e78796b37d1.tar.xz
syslinux-6e5e4d01cefda41da506c0c184f54e78796b37d1.zip
hdt: Don't search HDDs when no HDD got detected
Diffstat (limited to 'com32/hdt')
-rw-r--r--com32/hdt/hdt-dump-disks.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/com32/hdt/hdt-dump-disks.c b/com32/hdt/hdt-dump-disks.c
index bde04d2a..ff744b30 100644
--- a/com32/hdt/hdt-dump-disks.c
+++ b/com32/hdt/hdt-dump-disks.c
@@ -123,7 +123,9 @@ void show_disk(struct s_hardware *hardware, ZZJSON_CONFIG *conf, ZZJSON **it, in
void dump_disks(struct s_hardware *hardware, ZZJSON_CONFIG *config, ZZJSON **item) {
bool found=false;
- for (int drive = 0x80; drive < 0xff; drive++) {
+
+ if (hardware->disks_count > 0)
+ for (int drive = 0x80; drive < 0xff; drive++) {
if (hardware->disk_info[drive - 0x80].cbios) {
if (found==false) {
CREATE_NEW_OBJECT;