Re: [PATCH v3 09/14] qemu: Implement a layer for external devices like tpm-emulator

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

 



On 05/08/2018 04:50 PM, John Ferlan wrote:

On 05/04/2018 04:21 PM, Stefan Berger wrote:
+
+ cleanup:
+    VIR_FREE(shortName);
+    VIR_FREE(errbuf);
+    virCommandFree(cmd);
+
+    virObjectUnref(cfg);
+
+    return ret;
+
+ error:
+    VIR_FREE(tpm->data.emulator.source.data.nix.path);
Still not clear why VIR_FREE here since virDomainTPMDefFree does it.

Removed.


+
+    goto cleanup;
+}
+
Right about here you went back to single blank line between functions.

Until you now told me that this is the new rule, I was sometimes looking around in the file what others had used there before. ok, in this file I was inconsistent.@@ -6194,6 +6203,8 @@ qemuProcessLaunch(virConnectPtr conn,
      ret = 0;
cleanup:
+    if (ret)
+        qemuExtDevicesStop(driver, vm->def);
      qemuDomainSecretDestroy(vm);
      virCommandFree(cmd);
      virObjectUnref(logCtxt);
@@ -6614,6 +6625,8 @@ void qemuProcessStop(virQEMUDriverPtr driver,
qemuDomainCleanupRun(driver, vm); + qemuExtDevicesStop(driver, vm->def);
+
      /* Stop autodestroy in case guest is restarted */
      qemuProcessAutoDestroyRemove(driver, vm);
Anything need to be done during qemuProcessReconnect?

In all the scenarios I have tried so far I haven't come across having to add something to this function. If this is triggered by restart of libvirtd, I haven't seen a failure. I could have missed something, though.

  Stefan

John


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

  Powered by Linux