diff options
author | Jan Beulich <jbeulich@novell.com> | 2011-03-09 16:18:58 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2011-03-09 16:18:58 +0000 |
commit | a1630abae53f89e366eea574d650400347ab5f59 (patch) | |
tree | 6fa0669bb4e366f4cd12e3ed604a9f9317428b7b /xen/common/decompress.c | |
parent | 7f107ea5c0790f6a702c801589d13bd275e20260 (diff) | |
download | xen-a1630abae53f89e366eea574d650400347ab5f59.tar.gz xen-a1630abae53f89e366eea574d650400347ab5f59.tar.bz2 xen-a1630abae53f89e366eea574d650400347ab5f59.zip |
Add Dom0 xz kernel decompression
Largely taken from Linux 2.6.38 and made build/work for Xen.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/common/decompress.c')
-rw-r--r-- | xen/common/decompress.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/common/decompress.c b/xen/common/decompress.c index 87d58d75de..1098481922 100644 --- a/xen/common/decompress.c +++ b/xen/common/decompress.c @@ -20,6 +20,9 @@ int __init decompress(void *inbuf, unsigned int len, void *outbuf) if ( len >= 3 && !memcmp(inbuf, "\x42\x5a\x68", 3) ) return bunzip2(inbuf, len, NULL, NULL, outbuf, NULL, error); + if ( len >= 6 && !memcmp(inbuf, "\3757zXZ", 6) ) + return unxz(inbuf, len, NULL, NULL, outbuf, NULL, error); + if ( len >= 2 && !memcmp(inbuf, "\135\000", 2) ) return unlzma(inbuf, len, NULL, NULL, outbuf, NULL, error); |