diff options
author | Thomas Huth <thuth@redhat.com> | 2017-09-18 15:01:25 -0400 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2017-09-18 15:01:25 -0400 |
commit | 4c93950659487c7ad4f85571ee78524c1e3a94b3 (patch) | |
tree | a8277ce2c83027614be9a1078a4bab7d3f627eea /hw/ide | |
parent | 955f5c7ba127746345a3d43b4d7c885ca159ae6b (diff) | |
download | qemu-4c93950659487c7ad4f85571ee78524c1e3a94b3.zip qemu-4c93950659487c7ad4f85571ee78524c1e3a94b3.tar.gz qemu-4c93950659487c7ad4f85571ee78524c1e3a94b3.tar.bz2 |
hw/ide/microdrive: Mark the dscm1xxxx device with user_creatable = false
QEMU currently aborts with an assertion message when the user is trying
to remove a dscm1xxxx again:
$ aarch64-softmmu/qemu-system-aarch64 -S -M integratorcp -nographic
QEMU 2.9.93 monitor - type 'help' for more information
(qemu) device_add dscm1xxxx,id=xyz
(qemu) device_del xyz
**
ERROR:qemu/qdev-monitor.c:872:qdev_unplug: assertion failed: (hotplug_ctrl)
Aborted (core dumped)
Looks like this device has to be wired up in code and is not meant
to be hot-pluggable, so let's mark it with user_creatable = false.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 1503543783-17192-1-git-send-email-thuth@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'hw/ide')
-rw-r--r-- | hw/ide/microdrive.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c index e3fd30e..17917c0 100644 --- a/hw/ide/microdrive.c +++ b/hw/ide/microdrive.c @@ -575,12 +575,15 @@ PCMCIACardState *dscm1xxxx_init(DriveInfo *dinfo) static void dscm1xxxx_class_init(ObjectClass *oc, void *data) { PCMCIACardClass *pcc = PCMCIA_CARD_CLASS(oc); + DeviceClass *dc = DEVICE_CLASS(oc); pcc->cis = dscm1xxxx_cis; pcc->cis_len = sizeof(dscm1xxxx_cis); pcc->attach = dscm1xxxx_attach; pcc->detach = dscm1xxxx_detach; + /* Reason: Needs to be wired-up in code, see dscm1xxxx_init() */ + dc->user_creatable = false; } static const TypeInfo dscm1xxxx_type_info = { |