[PATCH 16/18] event-test: Add VIR_DOMAIN_EVENT_ID_DEVICE_REMOVAL_FAILED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 examples/object-events/event-test.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/examples/object-events/event-test.c b/examples/object-events/event-test.c
index 70f1d4c..1d8c4b1 100644
--- a/examples/object-events/event-test.c
+++ b/examples/object-events/event-test.c
@@ -802,6 +802,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)
 {
@@ -853,7 +866,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
-- 
2.8.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]