On 09/26/2011 03:03 PM, Michael S. Tsirkin wrote:
On Mon, Sep 26, 2011 at 12:35:10PM -0400, Stefan Berger wrote:
+void tpm_display_backend_drivers(FILE *out)
+{
+ int i;
+
+ fprintf(out, "Supported TPM types (choose only one):\n");
+
+ for (i = 0; bes[i] != NULL; i++) {
+ fprintf(out, "%12s %s",
+ bes[i]->id, bes[i]->desc());
+ fprintf(out, "\n");
+ }
+ fprintf(out, "\n");
+}
This dumps to stderr and so for qmp users it won't be correctly ordered.
I'd suggest simply using error_report. This means '?' goes to stderr,
not stdout, but that is consistent with e.g. -device '?'.
Though with error_report you get something like this here:
qemu-system-x86_64: -tpmdev ?: Supported TPM types (choose only one):
I don't think that's what we want. Let me just change it to *always*
print to stderr.
Stefan