From: Vladimir Sementsov-Ogievskiy Date: Tue, 3 Feb 2026 15:58:41 +0000 (+0300) Subject: tpm_emulator: print error on error-ignore path X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4244f84b3482fe491e246118d93c5685d09c166;p=thirdparty%2Fqemu.git tpm_emulator: print error on error-ignore path Commit 3469a56fa3dc985 introduced errp passthrough for many errors in the file. But in this specific case in tpm_emulator_get_buffer_size(), it simply used errp=NULL, so we lose printed error. Let's bring it back Note also, that 3469a56fa3dc985 was fixing another commit, 42e556fa3f7a "backends/tpm: Propagate vTPM error on migration failure" and didn't mention it. Fixes: 3469a56fa3dc985 "tmp_emulator: improve and fix use of errp" Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Berger Reviewed-by: Markus Armbruster Signed-off-by: Stefan Berger --- diff --git a/backends/tpm/tpm_emulator.c b/backends/tpm/tpm_emulator.c index f52cb4d435..6d8529da3b 100644 --- a/backends/tpm/tpm_emulator.c +++ b/backends/tpm/tpm_emulator.c @@ -557,8 +557,10 @@ static TPMVersion tpm_emulator_get_tpm_version(TPMBackend *tb) static size_t tpm_emulator_get_buffer_size(TPMBackend *tb) { size_t actual_size; + Error *local_err = NULL; - if (tpm_emulator_set_buffer_size(tb, 0, &actual_size, NULL) < 0) { + if (tpm_emulator_set_buffer_size(tb, 0, &actual_size, &local_err) < 0) { + error_report_err(local_err); return 4096; }