mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-03 11:51:11 +00:00
Clean up redundant usage of virDomainObjSetDefTransient
Commit45ec297d
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, commit8866eed
: 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.
This commit is contained in:
parent
2ccacdb3ec
commit
9b111048ad
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user