projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99244fa
)
qdev: don't crash on unset drive properties.
author
Gerd Hoffmann
<kraxel@redhat.com>
Tue, 22 Sep 2009 11:53:20 +0000
(13:53 +0200)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Mon, 5 Oct 2009 14:32:50 +0000
(09:32 -0500)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/qdev-properties.c
patch
|
blob
|
history
diff --git
a/hw/qdev-properties.c
b/hw/qdev-properties.c
index c4fb15c02046eacc3ce3692499e2cec46c8aa29d..5c627fae40819ce19c49b31adff3a51bdd39ebca 100644
(file)
--- a/
hw/qdev-properties.c
+++ b/
hw/qdev-properties.c
@@
-208,7
+208,7
@@
static int parse_drive(DeviceState *dev, Property *prop, const char *str)
static int print_drive(DeviceState *dev, Property *prop, char *dest, size_t len)
{
DriveInfo **ptr = qdev_get_prop_ptr(dev, prop);
- return snprintf(dest, len, "%s", (*ptr)
->id
);
+ return snprintf(dest, len, "%s", (*ptr)
? (*ptr)->id : "<null>"
);
}
PropertyInfo qdev_prop_drive = {