libxc: do not "panic" if a kernel is not a bzImage.
authorIan Campbell <ian.campbell@citrix.com>
Fri, 8 Jun 2012 15:05:38 +0000 (16:05 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 8 Jun 2012 15:05:38 +0000 (16:05 +0100)
Up until the point where we think this is a bzImage there is no point in
printing panicy messages -- some other loader will have a go (probably the
compressed ELF one)

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxc/xc_dom_bzimageloader.c

index 4954768a0d1947a96480bb280acd48d1b8d61e3b..113d40ff2f340d483d9a8ff9863ee3d2b9a23549 100644 (file)
@@ -575,8 +575,7 @@ static int xc_dom_probe_bzimage_kernel(struct xc_dom_image *dom)
 
     if ( dom->kernel_size < sizeof(struct setup_header) )
     {
-        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
-                     "%s: kernel image too small", __FUNCTION__);
+        xc_dom_printf(dom->xch, "%s: kernel image too small", __FUNCTION__);
         return -EINVAL;
     }
 
@@ -584,8 +583,7 @@ static int xc_dom_probe_bzimage_kernel(struct xc_dom_image *dom)
 
     if ( memcmp(&hdr->header, HDR_MAGIC, HDR_MAGIC_SZ) != 0 )
     {
-        xc_dom_panic(dom->xch, XC_INVALID_KERNEL,
-                     "%s: kernel is not a bzImage", __FUNCTION__);
+        xc_dom_printf(dom->xch, "%s: kernel is not a bzImage", __FUNCTION__);
         return -EINVAL;
     }