diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-06-06 12:39:39 +0200 |
|---|---|---|
| committer | Stefan Hajnoczi <stefanha@redhat.com> | 2024-06-10 13:05:27 -0400 |
| commit | 7682ecd48d6c177667e02a64b4287d7f31c27bd8 (patch) | |
| tree | 5e796c6060aef35b38a0d6a8467552cc4d254366 /backends/tpm/tpm_util.c | |
| parent | 0e2b9edfb6126fd9ce235a1b34ba20bbeb2547ae (diff) | |
| download | focaccia-qemu-7682ecd48d6c177667e02a64b4287d7f31c27bd8.tar.gz focaccia-qemu-7682ecd48d6c177667e02a64b4287d7f31c27bd8.zip | |
backends/tpm: Remove newline character in trace event
Split the 'tpm_util_show_buffer' event in two to avoid using a newline character. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Mads Ynddal <mads@ynddal.dk> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Message-id: 20240606103943.79116-2-philmd@linaro.org Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'backends/tpm/tpm_util.c')
| -rw-r--r-- | backends/tpm/tpm_util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/backends/tpm/tpm_util.c b/backends/tpm/tpm_util.c index 1856589c3b..cf138551df 100644 --- a/backends/tpm/tpm_util.c +++ b/backends/tpm/tpm_util.c @@ -339,10 +339,11 @@ void tpm_util_show_buffer(const unsigned char *buffer, size_t len, i; char *line_buffer, *p; - if (!trace_event_get_state_backends(TRACE_TPM_UTIL_SHOW_BUFFER)) { + if (!trace_event_get_state_backends(TRACE_TPM_UTIL_SHOW_BUFFER_CONTENT)) { return; } len = MIN(tpm_cmd_get_size(buffer), buffer_size); + trace_tpm_util_show_buffer_header(string, len); /* * allocate enough room for 3 chars per buffer entry plus a @@ -356,7 +357,7 @@ void tpm_util_show_buffer(const unsigned char *buffer, } p += sprintf(p, "%.2X ", buffer[i]); } - trace_tpm_util_show_buffer(string, len, line_buffer); + trace_tpm_util_show_buffer_content(line_buffer); g_free(line_buffer); } |