libvirt/libvirt-qemuProcessGuestPanicEventInfo-Fold-into-only-caller.patch
Jiri Denemark c6a4088d90 libvirt-12.5.0-3.el10
- qemu: Always assume support for 'QEMU_CAPS_SET_ACTION' (RHEL-242545)
- qemu: Remove unused 'qemuProcessRebootAllowed' (RHEL-242545)
- qemu: monitor: Remove support for 'watchdog-set-action' (RHEL-242545)
- qemu: Remove 'allowReboot' field (RHEL-242545)
- qemu: capabilities: Retire QEMU_CAPS_SET_ACTION (RHEL-242545)
- qemuProcessSetupLifecycleActions: Prepare to handle other actions (RHEL-242545)
- qemuDomainModifyLifecycleActionLive: Prepare to handle other actions (RHEL-242545)
- processGuestPanicEvent: Don't pass panic action via parameter (RHEL-242545)
- conf: Use proper enum types for 'onReboot', 'onPoweroff', 'onCrash', and 'onLockFailure' (RHEL-242545)
- qemuMonitorGuestPanicEventInfoFormatMsg: Directly return message (RHEL-242545)
- qemuProcessGuestPanicEventInfo: Fold into only caller (RHEL-242545)
- qemu: processGuestPanicEvent: Split individual steps under separate conditions (RHEL-242545)
- Add support for keeping VM running when panic notifier is used (RHEL-242545)
- qemu: Fix proper ordering of 'virtlockd' shutdown (RHEL-185108)
- qemu: move qemuAgent*InfoFormatParams to hypervisor/qemu_agent.c (RHEL-235731)
- Add guest device info to virDomainGetGuestInfo (RHEL-235731)
- qemu_agent: Introduce guest-get-devices (RHEL-235731)
- qemuagenttest: Introduce GetGuestDeviceInfo test case (RHEL-235731)
- qemu: Implement device info for virDomainGetGuestInfo() API (RHEL-235731)
- virsh: Add support for VIR_DOMAIN_GUEST_INFO_DEVICES (RHEL-235731)

Resolves: RHEL-185108, RHEL-235731, RHEL-242545
2026-08-19 14:56:37 +02:00

63 lines
2.1 KiB
Diff

From 09be2b6c34897411dfaf321aa2f0cb5cb8802005 Mon Sep 17 00:00:00 2001
Message-ID: <09be2b6c34897411dfaf321aa2f0cb5cb8802005.1787144197.git.jdenemar@redhat.com>
From: Peter Krempa <pkrempa@redhat.com>
Date: Tue, 21 Jul 2026 14:55:38 +0200
Subject: [PATCH] qemuProcessGuestPanicEventInfo: Fold into only caller
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Move the code directly to the only place that calls this function.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit bf4ace1bca464fe8432c2eb08f5261d6f9bdaf29)
https://redhat.atlassian.net/browse/RHEL-242545
---
src/qemu/qemu_driver.c | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index cb9f6fb7bf..391394485e 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3599,19 +3599,6 @@ doCoreDumpToAutoDumpPath(virQEMUDriver *driver,
}
-static void
-qemuProcessGuestPanicEventInfo(virQEMUDriver *driver,
- virDomainObj *vm,
- qemuMonitorEventPanicInfo *info)
-{
- g_autofree char *msg = qemuMonitorGuestPanicEventInfoFormatMsg(info);
- g_autofree char *timestamp = virTimeStringNow();
-
- if (msg && timestamp)
- qemuDomainLogAppendMessage(driver, vm, "%s: panic %s\n", timestamp, msg);
-}
-
-
static void
processGuestPanicEvent(virQEMUDriver *driver,
virDomainObj *vm,
@@ -3632,8 +3619,13 @@ processGuestPanicEvent(virQEMUDriver *driver,
goto endjob;
}
- if (info)
- qemuProcessGuestPanicEventInfo(driver, vm, info);
+ if (info) {
+ g_autofree char *msg = qemuMonitorGuestPanicEventInfoFormatMsg(info);
+ g_autofree char *timestamp = virTimeStringNow();
+
+ if (msg && timestamp)
+ qemuDomainLogAppendMessage(driver, vm, "%s: panic %s\n", timestamp, msg);
+ }
virDomainObjSetState(vm, VIR_DOMAIN_CRASHED, VIR_DOMAIN_CRASHED_PANICKED);
--
2.55.0