[PATCH 4/6] conf: Don't use virDomainLiveConfigHelperMethod in virDomainObjSetMetadata

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

 



---
 src/conf/domain_conf.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 78e394d..1ae10ca 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -24813,24 +24813,24 @@ virDomainObjSetMetadata(virDomainObjPtr vm,
                         const char *configDir,
                         unsigned int flags)
 {
+    virDomainDefPtr def;
     virDomainDefPtr persistentDef;

     virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
                   VIR_DOMAIN_AFFECT_CONFIG, -1);

-    if (virDomainLiveConfigHelperMethod(caps, xmlopt, vm, &flags,
-                                        &persistentDef) < 0)
+    if (virDomainObjGetDefs(vm, flags, &def, &persistentDef) < 0)
         return -1;

-    if (flags & VIR_DOMAIN_AFFECT_LIVE) {
-        if (virDomainDefSetMetadata(vm->def, type, metadata, key, uri) < 0)
+    if (def) {
+        if (virDomainDefSetMetadata(def, type, metadata, key, uri) < 0)
             return -1;

         if (virDomainSaveStatus(xmlopt, stateDir, vm, caps) < 0)
             return -1;
     }

-    if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
+    if (persistentDef) {
         if (virDomainDefSetMetadata(persistentDef, type, metadata, key,
                                     uri) < 0)
             return -1;
-- 
2.9.0

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