
On 03/14/2013 10:47 AM, Daniel P. Berrange wrote:
On Thu, Mar 14, 2013 at 10:44:32AM -0400, Stefan Berger wrote:
Hm, this surprises me since this would put JSON specific code into the monitor APIs (qemu_monitor.c) while qemu_monitor.c typically only serves as a dispatcher for either text monitor or json monitor.
No, you mis-understand me - I mean move the code into these 2 functions:
Sorry for bothering you about this one. If I was to move the code back into these functions, we'd end up with duplicate code in both functions. It's like having 100 lines of code while 50 + 10 do the same thing... You really want me to do this? Stefan
+int qemuMonitorJSONGetTPMModels(qemuMonitorPtr mon, + char ***tpmmodels) +{ + return qemuMonitorJSONGetStringArray(mon, "query-tpm-models", tpmmodels); +} + + +int qemuMonitorJSONGetTPMTypes(qemuMonitorPtr mon, + char ***tpmtypes) +{ + return qemuMonitorJSONGetStringArray(mon, "query-tpm-types", tpmtypes); +}
Daniel