[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] libxc: use xc_dom_panic when decompressor is not supported



commit b00f39b27b36b2e43038dc54abe2576f7eccce9b
Author:     Wei Liu <wei.liu2@xxxxxxxxxx>
AuthorDate: Fri Mar 6 11:33:48 2015 +0000
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Wed Mar 11 11:36:38 2015 +0000

    libxc: use xc_dom_panic when decompressor is not supported
    
    State explicitly that specific decompressor is not supported by libxc.
    Without this change, libxc error message only says the provided kernel
    is invalid, which is misleading.
    
    Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Cc: svenvan.van@xxxxxxxxx
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/libxc/xc_dom_bzimageloader.c |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/tools/libxc/xc_dom_bzimageloader.c 
b/tools/libxc/xc_dom_bzimageloader.c
index 964ebdc..3bb17dd 100644
--- a/tools/libxc/xc_dom_bzimageloader.c
+++ b/tools/libxc/xc_dom_bzimageloader.c
@@ -185,8 +185,9 @@ static int xc_try_bzip2_decode(
 static int xc_try_bzip2_decode(
     struct xc_dom_image *dom, void **blob, size_t *size)
 {
-    DOMPRINTF("%s: BZIP2 decompress support unavailable",
-              __FUNCTION__);
+    xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                 "%s: BZIP2 decompress support unavailable",
+                 __FUNCTION__);
     return -1;
 }
 
@@ -367,16 +368,18 @@ static int xc_try_lzma_decode(
 static int xc_try_xz_decode(
     struct xc_dom_image *dom, void **blob, size_t *size)
 {
-    DOMPRINTF("%s: XZ decompress support unavailable",
-              __FUNCTION__);
+    xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                 "%s: XZ decompress support unavailable",
+                 __FUNCTION__);
     return -1;
 }
 
 static int xc_try_lzma_decode(
     struct xc_dom_image *dom, void **blob, size_t *size)
 {
-    DOMPRINTF("%s: LZMA decompress support unavailable",
-              __FUNCTION__);
+    xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                 "%s: LZMA decompress support unavailable",
+                 __FUNCTION__);
     return -1;
 }
 
@@ -577,8 +580,9 @@ static int xc_try_lzo1x_decode(
 static int xc_try_lzo1x_decode(
     struct xc_dom_image *dom, void **blob, size_t *size)
 {
-    DOMPRINTF("%s: LZO1x decompress support unavailable\n",
-                  __FUNCTION__);
+    xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
+                 "%s: LZO1x decompress support unavailable\n",
+                 __FUNCTION__);
     return -1;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.