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>
This commit is contained in:
Jonathon Jongsma
2021-04-07 15:07:45 -05:00
parent d4375403ff
commit 94187b8004
3 changed files with 9 additions and 1 deletions
+4
View File
@@ -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;
}