[libvirt] [PATCH v3 09/14] qemu: Implement a layer for external devices like tpm-emulator
Stefan Berger
stefanb at linux.vnet.ibm.com
Wed May 9 19:24:17 UTC 2018
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
>
More information about the libvir-list
mailing list