]> git.proxmox.com Git - qemu.git/commitdiff
ide: Fix info qtree for ide-drive.ver
authorMarkus Armbruster <armbru@redhat.com>
Tue, 1 Jun 2010 18:32:33 +0000 (20:32 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 4 Jun 2010 09:43:39 +0000 (11:43 +0200)
Show the actual default value instead of <null> when the property has
not been set.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/ide/qdev.c

index 5e549d9d2fcdf5cc6635c379932a6543c3c5dcf6..6231d7716c040dd84d18105532b42284af74e3ca 100644 (file)
@@ -110,6 +110,9 @@ static int ide_drive_initfn(IDEDevice *dev)
 
     ide_init_drive(s, dev->conf.dinfo, dev->version, serial);
 
+    if (!dev->version) {
+        dev->version = qemu_strdup(s->version);
+    }
     if (!dev->serial) {
         dev->serial = qemu_strdup(s->drive_serial_str);
     }