On 5/3/21 4:56 AM, Olaf Hering wrote:
In Xen 4.2 struct libxl_event_hooks had a member which was erroneously
declared const. Since libvirt requires at least Xen 4.6, remove the dead
code.
Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
src/libxl/libxl_domain.c | 2 +-
src/libxl/libxl_domain.h | 14 +-------------
2 files changed, 2 insertions(+), 14 deletions(-)
Reviewed-by: Jim Fehlig <jfehlig@xxxxxxxx>
diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index 917f6f1d81..d78765ad84 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -641,7 +641,7 @@ libxlDomainHandleDeath(libxlDriverPrivate *driver, virDomainObj *vm)
* Handle previously registered domain event notification from libxenlight.
*/
void
-libxlDomainEventHandler(void *data, VIR_LIBXL_EVENT_CONST libxl_event *event)
+libxlDomainEventHandler(void *data, libxl_event *event)
{
libxlDriverPrivate *driver = data;
libxl_shutdown_reason xl_reason = event->u.domain_shutdown.shutdown_reason;
diff --git a/src/libxl/libxl_domain.h b/src/libxl/libxl_domain.h
index 8223b1d255..cbe7ba19ba 100644
--- a/src/libxl/libxl_domain.h
+++ b/src/libxl/libxl_domain.h
@@ -117,20 +117,8 @@ void
libxlDomainCleanup(libxlDriverPrivate *driver,
virDomainObj *vm);
-/*
- * Note: Xen 4.3 removed the const from the event handler signature.
- * Detect which signature to use based on
- * LIBXL_HAVE_NONCONST_EVENT_OCCURS_EVENT_ARG.
- */
-#ifdef LIBXL_HAVE_NONCONST_EVENT_OCCURS_EVENT_ARG
-# define VIR_LIBXL_EVENT_CONST /* empty */
-#else
-# define VIR_LIBXL_EVENT_CONST const
-#endif
-
void
-libxlDomainEventHandler(void *data,
- VIR_LIBXL_EVENT_CONST libxl_event *event);
+libxlDomainEventHandler(void *data, libxl_event *event);
int
libxlDomainAutoCoreDump(libxlDriverPrivate *driver,