[PATCH] tools/libs/guest: LZMA_OPTIONS_ERROR message cleanup

Andrew Mbugua posted 1 patch 16 hours ago
[PATCH] tools/libs/guest: LZMA_OPTIONS_ERROR message cleanup
Posted by Andrew Mbugua 16 hours ago
Code cleanup. No functional change.

The current message is formatted as:

DOMPRINTF("%s: %s decompression error: %s",
__FUNCTION__, what, msg);
free(out_buf);
goto lzma_cleanup;

Which outputs: Unsupported compression options

I have formatted the message to give insight to users who may encounter
compression filters such as BCJ filters without cluttering the log output.

The other option was to simply remove the "// FIXME: Better message?"
line and leave the message as is to cleanup the codebase.


Signed-off-by: Andrew Mbugua <andrewprecious388@gmail.com>
---
diff --git a/tools/libs/guest/xg_dom_bzimageloader.c b/tools/libs/guest/xg_dom_bzimageloader.c
index 32b3c682a4..a7ad260c27 100644
--- a/tools/libs/guest/xg_dom_bzimageloader.c
+++ b/tools/libs/guest/xg_dom_bzimageloader.c
@@ -217,8 +217,7 @@ static int _xc_try_lzma_decode(
             break;
 
         case LZMA_OPTIONS_ERROR:
-            // FIXME: Better message?
-            msg = "Unsupported compression options";
+            msg = "Unsupported compression options or filters";
             break;
 
         case LZMA_DATA_ERROR: