[syslinux:master] hdt: Don't search HDDs when no HDD got detected
syslinux-bot for Erwan Velu
erwanaliasr1 at gmail.com
Thu Dec 22 13:18:12 PST 2011
Commit-ID: 6e5e4d01cefda41da506c0c184f54e78796b37d1
Gitweb: http://www.syslinux.org/commit/6e5e4d01cefda41da506c0c184f54e78796b37d1
Author: Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Thu, 22 Sep 2011 20:52:49 +0200
Committer: Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Thu, 22 Sep 2011 20:52:49 +0200
hdt: Don't search HDDs when no HDD got detected
---
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 bde04d2..ff744b3 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;
More information about the Syslinux-commits
mailing list