summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2020-07-09 10:56:51 -0500
committerJonathon Jongsma <jjongsma@redhat.com>2021-04-07 15:07:45 -0500
commit94187b800472595db9c15c1843b572f327b99ca6 (patch)
treeb359763ad08e689e3dad87386f2a4f78839d7e4f /examples
parentd4375403ff80f64eeace3f6b57a50f1f6914a31a (diff)
downloadlibvirt-94187b800472595db9c15c1843b572f327b99ca6.tar.gz
nodedev: add DEFINED/UNDEFINED lifecycle events
Since a mediated device can be persistently defined by the mdevctl backend, we need additional lifecycle events beyond CREATED/DELETED to indicate that e.g. the device has been stopped but the device definition still exists. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/c/misc/event-test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/c/misc/event-test.c b/examples/c/misc/event-test.c
index 76d4f3f6e8..10c707e66b 100644
--- a/examples/c/misc/event-test.c
+++ b/examples/c/misc/event-test.c
@@ -381,6 +381,10 @@ nodeDeviceEventToString(int event)
return "Created";
case VIR_NODE_DEVICE_EVENT_DELETED:
return "Deleted";
+ case VIR_NODE_DEVICE_EVENT_DEFINED:
+ return "Defined";
+ case VIR_NODE_DEVICE_EVENT_UNDEFINED:
+ return "Undefined";
case VIR_NODE_DEVICE_EVENT_LAST:
break;
}