From: Jim Fehlig <jfehlig@suse.com>
Date: Wed, 24 Nov 2021 11:10:19 -0700
Subject: libxl: Rename libxlShutdownThreadInfo struct

An upcoming change will use the struct in a thread created to process
death events. Rename libxlShutdownThreadInfo to libxlEventHandlerThreadInfo
to reflect the more generic usage.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Origin: https://gitlab.com/libvirt/libvirt/-/commit/a4e6fba069c0809b8b5dde5e9db62d2efd91b4a0
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2034195
Bug-Debian: https://security-tracker.debian.org/tracker/CVE-2021-4147
Bug-Debian: https://bugs.debian.org/1002535
---
 src/libxl/libxl_domain.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c
index f97c6da..6ad9ab7 100644
--- a/src/libxl/libxl_domain.c
+++ b/src/libxl/libxl_domain.c
@@ -473,7 +473,7 @@ libxlDomainShutdownHandleRestart(libxlDriverPrivatePtr driver,
 }
 
 
-struct libxlShutdownThreadInfo
+struct libxlEventHandlerThreadInfo
 {
     libxlDriverPrivatePtr driver;
     virDomainObjPtr vm;
@@ -484,7 +484,7 @@ struct libxlShutdownThreadInfo
 static void
 libxlDomainShutdownThread(void *opaque)
 {
-    struct libxlShutdownThreadInfo *shutdown_info = opaque;
+    struct libxlEventHandlerThreadInfo *shutdown_info = opaque;
     virDomainObjPtr vm = shutdown_info->vm;
     libxl_event *ev = shutdown_info->event;
     libxlDriverPrivatePtr driver = shutdown_info->driver;
@@ -661,7 +661,7 @@ libxlDomainEventHandler(void *data, VIR_LIBXL_EVENT_CONST libxl_event *event)
     }
 
     if (event->type == LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN) {
-        struct libxlShutdownThreadInfo *shutdown_info = NULL;
+        struct libxlEventHandlerThreadInfo *shutdown_info = NULL;
         virThread thread;
         g_autofree char *name = NULL;
 
@@ -669,7 +669,7 @@ libxlDomainEventHandler(void *data, VIR_LIBXL_EVENT_CONST libxl_event *event)
          * Start a thread to handle shutdown.  We don't want to be tying up
          * libxl's event machinery by doing a potentially lengthy shutdown.
          */
-        shutdown_info = g_new0(struct libxlShutdownThreadInfo, 1);
+        shutdown_info = g_new0(struct libxlEventHandlerThreadInfo, 1);
 
         shutdown_info->driver = driver;
         shutdown_info->vm = vm;
@@ -689,7 +689,7 @@ libxlDomainEventHandler(void *data, VIR_LIBXL_EVENT_CONST libxl_event *event)
         }
         /*
          * virDomainObjEndAPI is called in the shutdown thread, where
-         * libxlShutdownThreadInfo and libxl_event are also freed.
+         * libxlEventHandlerThreadInfo and libxl_event are also freed.
          */
         return;
     } else if (event->type == LIBXL_EVENT_TYPE_DOMAIN_DEATH) {
