qemu-e2k/backends
Stefan Berger 88f8307457 tpm_emulator: Report an error if chardev is missing
This patch fixes the odd error reporting when trying to send a file
descriptor to the TPM emulator if one has not passed a valid chardev.

$ x86_64-softmmu/qemu-system-x86_64 -tpmdev emulator,id=tpm0
qemu-system-x86_64: -tpmdev emulator,id=tpm0: tpm-emulator: Failed to send CMD_SET_DATAFD: Success
qemu-system-x86_64: -tpmdev emulator,id=tpm0: tpm-emulator: Could not cleanly shutdown the TPM: Success

This is the new error report:

$ x86_64-softmmu/qemu-system-x86_64 -tpmdev emulator,id=tpm0
qemu-system-x86_64: -tpmdev emulator,id=tpm0: tpm-emulator: parameter 'chardev' is missing

This change does not hide the display of supported TPM types if a non-existent type is passed:

$ x86_64-softmmu/qemu-system-x86_64 -tpmdev nonexistent,id=tpm0
qemu-system-x86_64: -tpmdev nonexistent,id=tpm0: Parameter 'type' expects a TPM backend type
Supported TPM types (choose only one):
 passthrough   Passthrough TPM backend driver
    emulator   TPM emulator backend driver

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
2020-07-24 12:44:13 -04:00
..
tpm tpm_emulator: Report an error if chardev is missing 2020-07-24 12:44:13 -04:00
cryptodev-builtin.c cryptodev: Fix cryptodev_builtin_cleanup() error API violation 2020-04-29 08:01:52 +02:00
cryptodev-vhost-user.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
cryptodev-vhost.c
cryptodev.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
dbus-vmstate.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
hostmem-file.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
hostmem-memfd.c error: Eliminate error_propagate() with Coccinelle, part 1 2020-07-10 15:18:08 +02:00
hostmem-ram.c
hostmem.c qom: Change object_get_canonical_path_component() not to malloc 2020-07-21 16:23:43 +02:00
Kconfig tpm: Move backend code under the 'backends/' directory 2020-06-19 07:25:55 -04:00
Makefile.objs backends: Add TPM files into their own directory 2020-06-19 07:24:42 -04:00
rng-builtin.c
rng-egd.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
rng-random.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00
rng.c qom: Put name parameter before value / visitor parameter 2020-07-10 15:18:08 +02:00
trace-events
vhost-user.c qom: Drop parameter @errp of object_property_add() & friends 2020-05-15 07:07:58 +02:00