mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
qemuProcessGuestPanicEventInfo: Fold into only caller
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>
This commit is contained in:
1 parent
3f41645e3d
commit
bf4ace1bca
1 file changed
+7
-15
+7
-15
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user