Re: [PATCH 45/66] vbox: Rewrite vboxDomainAttachDeviceFlags

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

 



On 11.08.2014 12:06, Taowei wrote:
---
  src/vbox/vbox_common.c        |   14 ++++++++++++++
  src/vbox/vbox_tmpl.c          |   15 ---------------
  src/vbox/vbox_uniformed_api.h |    2 ++
  3 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 84d82d7..f22cb5b 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -4155,3 +4155,17 @@ int vboxDomainAttachDevice(virDomainPtr dom, const char *xml)
  {
      return vboxDomainAttachDeviceImpl(dom, xml, 0);
  }
+
+int vboxDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
+                                unsigned int flags)
+{
+    virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG, -1);
+
+    if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
+        virReportError(VIR_ERR_OPERATION_INVALID, "%s",
+                       _("cannot modify the persistent configuration of a domain"));
+        return -1;
+    }

I know you're just copying pre-existing code, but this doesn't make much sense to me. I'd just drop VIR_DOMAIN_AFFECT_CONFIG flag from the virCheckFlags().

Michal

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