]> xenbits.xensource.com Git - libvirt.git/commitdiff
Clean up redundant usage of virDomainObjSetDefTransient
authorJán Tomko <jtomko@redhat.com>
Fri, 27 May 2016 10:56:05 +0000 (12:56 +0200)
committerJán Tomko <jtomko@redhat.com>
Mon, 6 Jun 2016 06:34:22 +0000 (08:34 +0200)
Commit 45ec297d from November 2010:
    Make state driver device hotplug/update actually transient
added virDomainObjSetDefTransient calls to the domain startup
function in several drivers.

In November 2011, commit 8866eed:
    Set aliases for LXC/UML console devices
added a call earlier in the startup function, without removing the
existing ones.

Also, in the UML driver it seems the function never did anything
useful - vm->def->id is set asynchronnously in umlNotifyEvent.
At the time of calling virDomainObjSetDefTransient with live=false,
vm->def->id was likely still -1, making the call a no-op.

src/lxc/lxc_process.c
src/uml/uml_driver.c

index 17fbc5f6e637c5104b5d5fc1d9bdd3d1a41b884f..058c3e1e7ef2dc05a031a8975634a09222420d51 100644 (file)
@@ -1542,10 +1542,6 @@ int virLXCProcessStart(virConnectPtr conn,
                              conn, lxcProcessAutoDestroy) < 0)
         goto cleanup;
 
-    if (virDomainObjSetDefTransient(caps, driver->xmlopt,
-                                    vm, false) < 0)
-        goto cleanup;
-
     /* We don't need the temporary NIC names anymore, clear them */
     virLXCProcessCleanInterfaces(vm->def);
 
index 923c3f6e97b410131b5c268cc5697fb9580acb83..d68054e0aae939c69778935f42de7f32b93f72c8 100644 (file)
@@ -1130,7 +1130,7 @@ static int umlStartVMDaemon(virConnectPtr conn,
         umlProcessAutoDestroyAdd(driver, vm, conn) < 0)
         goto cleanup;
 
-    ret = virDomainObjSetDefTransient(driver->caps, driver->xmlopt, vm, false);
+    ret = 0;
  cleanup:
     VIR_FORCE_CLOSE(logfd);
     virCommandFree(cmd);