From 148460c23536c7c06490088edda101013c6d55c5 Mon Sep 17 00:00:00 2001 From: Steffen Eiden Date: Mon, 1 Aug 2022 13:42:45 +0200 Subject: [PATCH] pvattest: Improve error reporting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Map the Ultravisor return code 0x2 to "Invalid UV command" string. This results in better error messages. Signed-off-by: Steffen Eiden Reviewed-by: Marc Hartmayer Signed-off-by: Jan Höppner --- pvattest/src/uvio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pvattest/src/uvio.c b/pvattest/src/uvio.c index 2576f6ed..7f369668 100644 --- a/pvattest/src/uvio.c +++ b/pvattest/src/uvio.c @@ -156,6 +156,8 @@ int uvio_open(const char *uv_path, GError **error) const char *uvio_uv_rc_to_str(const int rc) { switch (rc) { + case 0x02: + return _("Invalid UV command"); case 0x106: return _("Unsupported attestation request version"); case 0x108: