From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>, xen-devel@lists.xen.org
Cc: svenvan.van@gmail.com, Ian Jackson <ian.jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH] libxc: use xc_dom_panic when decompressor is not supported
Date: Fri, 06 Mar 2015 12:43:13 +0000 [thread overview]
Message-ID: <54F9A0E1.7050409@citrix.com> (raw)
In-Reply-To: <1425641628-19364-1-git-send-email-wei.liu2@citrix.com>
On 06/03/2015 11:33, Wei Liu wrote:
> 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@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: svenvan.van@gmail.com
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
I did the triage of this issue when reported on #xen. `xl -vvv
create...` does eventually reveal the issue, where `xl create` gives an
incorrect error message.
(although s/__FUNCTION__/__func__/ to be more C99 if you have cause to
resubmit)
> ---
> tools/libxc/xc_dom_bzimageloader.c | 20 ++++++++++++--------
> 1 file 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;
> }
>
next prev parent reply other threads:[~2015-03-06 12:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-06 11:33 [PATCH] libxc: use xc_dom_panic when decompressor is not supported Wei Liu
2015-03-06 12:43 ` Andrew Cooper [this message]
2015-03-11 12:29 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54F9A0E1.7050409@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=svenvan.van@gmail.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.