[PATCH v2 06/12] qemu: add a function to remove a RNG device

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

 



qemu side functions, call virDomainRNGRemove to help us.

Signed-off-by: Luyao Huang <lhuang@xxxxxxxxxx>
---
 src/qemu/qemu_hotplug.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 1714341..e54a541 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1502,6 +1502,22 @@ int qemuDomainAttachChrDevice(virQEMUDriverPtr driver,
     return ret;
 }
 
+static virDomainRNGDefPtr
+qemuDomainRNGRemove(virDomainDefPtr vmdef,
+                    virDomainRNGDefPtr rng)
+{
+    virDomainRNGDefPtr ret;
+
+    if (!(ret = virDomainRNGRemove(vmdef, rng))) {
+        virReportError(VIR_ERR_INVALID_ARG, "%s",
+                       _("device not present in domain configuration"));
+        return NULL;
+    }
+
+    return ret;
+}
+
+
 static int
 qemuDomainAttachHostUSBDevice(virQEMUDriverPtr driver,
                               virDomainObjPtr vm,
-- 
1.8.3.1

--
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]