diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2016-03-16 17:06:02 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2016-03-16 17:42:19 +0000 |
| commit | fec44a8c70e23f0f8433a28e824ce6dae4de8cde (patch) | |
| tree | 5dd25667e072bf580983ac1d0ad54a31b0b083f9 /fsdev/qemu-fsdev-opts.c | |
| parent | 6717f587a478be37294cc5cfbbd84c5a6ce1aa1f (diff) | |
| download | focaccia-qemu-fec44a8c70e23f0f8433a28e824ce6dae4de8cde.tar.gz focaccia-qemu-fec44a8c70e23f0f8433a28e824ce6dae4de8cde.zip | |
sd: Fix "info qtree" on boards with SD cards
The SD card object is not a SysBusDevice, so don't create it with qdev_create() if we're not assigning it to a specific bus; use object_new() instead. This was causing 'info qtree' to segfault on boards with SD cards, because qdev_create(NULL, TYPE_FOO) puts the created object on the system bus, and then we may try to run functions like sysbus_dev_print() on it, which fail when casting the object to SysBusDevice. (This is the same mistake that we made with the NAND device and fixed in commit 6749695eaaf346c1.) Reported-by: xiaoqiang.zhao <zxq_yx_007@163.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: xiaoqiang.zhao <zxq_yx_007@163.com> Message-id: 1458061009-7733-1-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'fsdev/qemu-fsdev-opts.c')
0 files changed, 0 insertions, 0 deletions