Patchwork [12/14] ide: Fix info qtree for ide-drive.ver

login
register
mail settings
Submitter Markus Armbruster
Date May 28, 2010, 1:38 p.m.
Message ID <1275053935-10627-13-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/53906/
State New
Headers show

Comments

Markus Armbruster - May 28, 2010, 1:38 p.m.
Show the actual default value instead of <null> when the property has
not been set.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/ide/qdev.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c
index 5f301bc..9b2aa21 100644
--- a/hw/ide/qdev.c
+++ b/hw/ide/qdev.c
@@ -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);
     }