qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 09/12] qapi/meson: Restrict qdev code to system-mode emula


From: Paolo Bonzini
Subject: Re: [PATCH v2 09/12] qapi/meson: Restrict qdev code to system-mode emulation
Date: Tue, 26 Jan 2021 16:46:33 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 24/01/21 01:32, Philippe Mathieu-Daudé wrote:

The alternative is ugly:

-- >8 --
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index cefc5eaa0a9..d09f32e38d6 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -950,7 +950,9 @@ static void device_finalize(Object *obj)
     if (dev->pending_deleted_event) {
         g_assert(dev->canonical_path);

+#ifdef CONFIG_USER_ONLY
         qapi_event_send_device_deleted(!!dev->id, dev->id,
dev->canonical_path);
+#endif
         g_free(dev->canonical_path);
         dev->canonical_path = NULL;
     }
---

Well, the alternative is also to not do anything. There's already a stub for qapi_event_emit, does it really hurt to have the not-stubbed-out code for qapi_event_send_device_deleted?

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]