hdt: Dumping disk failed when disk are present
authorErwan Velu <erwanaliasr1@gmail.com>
Wed, 21 Sep 2011 19:44:47 +0000 (21:44 +0200)
committerErwan Velu <erwanaliasr1@gmail.com>
Thu, 22 Sep 2011 20:44:33 +0000 (22:44 +0200)
When physical disks were present, the computed items were not flushed
and so not present on the disk file.

Thanks to pscheie for reporting this.

com32/hdt/hdt-dump-disks.c

index ef8cf22..bde04d2 100644 (file)
@@ -137,7 +137,7 @@ void dump_disks(struct s_hardware *hardware, ZZJSON_CONFIG *config, ZZJSON **ite
        if (found==false) {
                CREATE_NEW_OBJECT;
                add_b("disks->is_valid",false);
-               FLUSH_OBJECT;
        }
+       FLUSH_OBJECT;
        to_cpio("disks");
 }