projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e30194
)
hdt: Don't search HDDs when no HDD got detected
author
Erwan Velu
<erwanaliasr1@gmail.com>
Thu, 22 Sep 2011 18:52:49 +0000
(20:52 +0200)
committer
Erwan Velu
<erwanaliasr1@gmail.com>
Thu, 22 Sep 2011 18:52:49 +0000
(20:52 +0200)
com32/hdt/hdt-dump-disks.c
patch
|
blob
|
history
diff --git
a/com32/hdt/hdt-dump-disks.c
b/com32/hdt/hdt-dump-disks.c
index
bde04d2
..
ff744b3
100644
(file)
--- 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;