mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
qemu: Remove return value from qemuMonitorDomainMemoryFailureCallback
Change the callback prototype and fix the callback registered in the process code. The removed error messages are impossible as the enum values are converted via VIR_ENUM helpers and guarded by compiler checks. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
b9357e939d
commit
59ba742cbc
@ -356,10 +356,10 @@ struct _qemuMonitorEventMemoryFailure {
|
||||
bool recursive;
|
||||
};
|
||||
|
||||
typedef int (*qemuMonitorDomainMemoryFailureCallback)(qemuMonitor *mon,
|
||||
virDomainObj *vm,
|
||||
qemuMonitorEventMemoryFailure *mfp,
|
||||
void *opaque);
|
||||
typedef void (*qemuMonitorDomainMemoryFailureCallback)(qemuMonitor *mon,
|
||||
virDomainObj *vm,
|
||||
qemuMonitorEventMemoryFailure *mfp,
|
||||
void *opaque);
|
||||
|
||||
typedef struct _qemuMonitorCallbacks qemuMonitorCallbacks;
|
||||
struct _qemuMonitorCallbacks {
|
||||
|
@ -1815,7 +1815,7 @@ qemuProcessHandleGuestCrashloaded(qemuMonitor *mon G_GNUC_UNUSED,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
static void
|
||||
qemuProcessHandleMemoryFailure(qemuMonitor *mon G_GNUC_UNUSED,
|
||||
virDomainObj *vm,
|
||||
qemuMonitorEventMemoryFailure *mfp,
|
||||
@ -1836,9 +1836,7 @@ qemuProcessHandleMemoryFailure(qemuMonitor *mon G_GNUC_UNUSED,
|
||||
break;
|
||||
case QEMU_MONITOR_MEMORY_FAILURE_RECIPIENT_LAST:
|
||||
default:
|
||||
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
_("requested unknown memory failure recipient"));
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (mfp->action) {
|
||||
@ -1856,9 +1854,7 @@ qemuProcessHandleMemoryFailure(qemuMonitor *mon G_GNUC_UNUSED,
|
||||
break;
|
||||
case QEMU_MONITOR_MEMORY_FAILURE_ACTION_LAST:
|
||||
default:
|
||||
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
_("requested unknown memory failure action"));
|
||||
return -1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (mfp->action_required)
|
||||
@ -1868,8 +1864,6 @@ qemuProcessHandleMemoryFailure(qemuMonitor *mon G_GNUC_UNUSED,
|
||||
|
||||
event = virDomainEventMemoryFailureNewFromObj(vm, recipient, action, flags);
|
||||
virObjectEventStateQueue(driver->domainEventState, event);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user