mirror of https://gitee.com/openkylin/libvirt.git
event-test: Add VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED
This commit is contained in:
parent
9e9a5cf0f4
commit
cecbb0642e
|
@ -801,6 +801,19 @@ myDomainEventJobCompletedCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||
}
|
||||
|
||||
|
||||
static int
|
||||
myDomainEventDeviceRemovalFailedCallback(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
virDomainPtr dom,
|
||||
const char *devAlias,
|
||||
void *opaque ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("%s EVENT: Domain %s(%d) device removal failed: %s\n",
|
||||
__func__, virDomainGetName(dom), virDomainGetID(dom), devAlias);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
myFreeFunc(void *opaque)
|
||||
{
|
||||
|
@ -852,7 +865,7 @@ struct domainEventData domainEvents[] = {
|
|||
DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_DEVICE_ADDED, myDomainEventDeviceAddedCallback),
|
||||
DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_MIGRATION_ITERATION, myDomainEventMigrationIterationCallback),
|
||||
DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_JOB_COMPLETED, myDomainEventJobCompletedCallback),
|
||||
/* VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED */
|
||||
DOMAIN_EVENT(VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED, myDomainEventDeviceRemovalFailedCallback),
|
||||
};
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in New Issue