diff options
author | Erwan Velu <erwanaliasr1@gmail.com> | 2011-09-22 20:52:49 +0200 |
---|---|---|
committer | Erwan Velu <erwanaliasr1@gmail.com> | 2011-09-22 20:52:49 +0200 |
commit | 6e5e4d01cefda41da506c0c184f54e78796b37d1 (patch) | |
tree | ebc3981195df5f8ea0a74a53dac88a0171027614 | |
parent | 7e301945d8a3d5b99fbac741a769e6dc15d527f9 (diff) | |
download | syslinux-6e5e4d01cefda41da506c0c184f54e78796b37d1.tar.gz syslinux-6e5e4d01cefda41da506c0c184f54e78796b37d1.tar.xz syslinux-6e5e4d01cefda41da506c0c184f54e78796b37d1.zip |
hdt: Don't search HDDs when no HDD got detected
-rw-r--r-- | com32/hdt/hdt-dump-disks.c | 4 |
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; |