On Fri, Mar 26, 2021 at 11:48:16AM -0500, Jonathon Jongsma wrote:
This interface allows you to undefine a persistently defined (but
inactive) mediated devices. It is implemented via 'mdevctl'
Signed-off-by: Jonathon Jongsma <jjongsma(a)redhat.com>
---
include/libvirt/libvirt-nodedev.h | 2 +
src/access/viraccessperm.c | 2 +-
src/access/viraccessperm.h | 6 ++
src/driver-nodedev.h | 4 +
src/libvirt-nodedev.c | 36 +++++++++
src/libvirt_public.syms | 1 +
src/node_device/node_device_driver.c | 73 +++++++++++++++++++
src/node_device/node_device_driver.h | 7 ++
src/node_device/node_device_udev.c | 1 +
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 14 +++-
src/remote_protocol-structs | 4 +
.../nodedevmdevctldata/mdevctl-undefine.argv | 1 +
tests/nodedevmdevctltest.c | 8 ++
14 files changed, 158 insertions(+), 2 deletions(-)
create mode 100644 tests/nodedevmdevctldata/mdevctl-undefine.argv
diff --git a/include/libvirt/libvirt-nodedev.h b/include/libvirt/libvirt-nodedev.h
index 33eb46b3cd..623017f1fd 100644
--- a/include/libvirt/libvirt-nodedev.h
+++ b/include/libvirt/libvirt-nodedev.h
@@ -135,6 +135,8 @@ virNodeDevicePtr virNodeDeviceDefineXML(virConnectPtr conn,
const char *xmlDesc,
unsigned int flags);
+int virNodeDeviceUndefine(virNodeDevicePtr dev);
This API doesn't follow our best practice which is to *always* have an
"unsigned int flags" parameter, even if we don't currently think we
need it.
I think this needs fixing asap since it affects public API, wire
protocol and language bindings, and we're not yet locked into the
API design.
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|