Re: [PATCH v1 1/4] libxl: remove obsolete VIR_LIBXL_EVENT_CONST

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

 



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,





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux