X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=init%2Finitramfs.c;h=b37d34beb90bb0b3f490731d641ab3a2a07e45d7;hb=f8a85f1164a33e3eb5b421b137ced793ed53ee33;hp=4c00edc59689034895ad6728c9b5b4505a8386b3;hpb=7dc3ca39cb1e22eedbf1207ff9ac7bf682fc0f6d;p=mv-sheeva.git diff --git a/init/initramfs.c b/init/initramfs.c index 4c00edc5968..b37d34beb90 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -413,7 +413,7 @@ static unsigned my_inptr; /* index of next byte to be processed in inbuf */ static char * __init unpack_to_rootfs(char *buf, unsigned len) { - int written; + int written, res; decompress_fn decompress; const char *compress_name; static __initdata char msg_buf[64]; @@ -445,10 +445,12 @@ static char * __init unpack_to_rootfs(char *buf, unsigned len) } this_header = 0; decompress = decompress_method(buf, len, &compress_name); - if (decompress) - decompress(buf, len, NULL, flush_buffer, NULL, + if (decompress) { + res = decompress(buf, len, NULL, flush_buffer, NULL, &my_inptr, error); - else if (compress_name) { + if (res) + error("decompressor failed"); + } else if (compress_name) { if (!message) { snprintf(msg_buf, sizeof msg_buf, "compression method %s not configured",