From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dt1WE-0005Ae-6l for qemu-devel@nongnu.org; Fri, 15 Sep 2017 21:03:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dt1WB-00067b-Gg for qemu-devel@nongnu.org; Fri, 15 Sep 2017 21:03:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47856) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dt1WB-00066h-Am for qemu-devel@nongnu.org; Fri, 15 Sep 2017 21:03:35 -0400 From: John Snow Date: Fri, 15 Sep 2017 21:03:21 -0400 Message-Id: <20170916010330.10435-3-jsnow@redhat.com> In-Reply-To: <20170916010330.10435-1-jsnow@redhat.com> References: <20170916010330.10435-1-jsnow@redhat.com> Subject: [Qemu-devel] [PULL 02/11] hw/ide/microdrive: Mark the dscm1xxxx device with user_creatable = false List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, jsnow@redhat.com, Thomas Huth From: Thomas Huth 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 Reviewed-by: John Snow Message-id: 1503543783-17192-1-git-send-email-thuth@redhat.com Signed-off-by: John Snow --- hw/ide/microdrive.c | 3 +++ 1 file changed, 3 insertions(+) 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 = { -- 2.9.5