Skip to content
  • Stefan Berger's avatar
    88f83074
    tpm_emulator: Report an error if chardev is missing · 88f83074
    Stefan Berger authored
    
    
    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: default avatarStefan Berger <stefanb@linux.ibm.com>
    Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
    Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
    88f83074
    tpm_emulator: Report an error if chardev is missing
    Stefan Berger authored
    
    
    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: default avatarStefan Berger <stefanb@linux.ibm.com>
    Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
    Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
Loading