aboutsummaryrefslogtreecommitdiff
path: root/init/do_mounts_rd.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2009-01-12 14:24:04 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2009-01-12 14:34:31 -0800
commit23a22d57a8962479ca630c9542e62d6f86fdf927 (patch)
tree5839f8f3125a7ddf90eb6c679908206ba464b7af /init/do_mounts_rd.c
parent736f93236ce786d1bcf09ad4dcb38a360d35ea1b (diff)
downloadlinux-linaro-stable-23a22d57a8962479ca630c9542e62d6f86fdf927.tar.gz
bzip2/lzma: comprehensible error messages for missing decompressor
Instead of failing to identify a compressed image with a decompressor that we don't have compiled in, identify it and fail with a comprehensible panic message. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'init/do_mounts_rd.c')
-rw-r--r--init/do_mounts_rd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c
index a015e267fd17..91d0cfca5071 100644
--- a/init/do_mounts_rd.c
+++ b/init/do_mounts_rd.c
@@ -79,9 +79,12 @@ identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor)
sys_read(fd, buf, size);
*decompressor = decompress_method(buf, size, &compress_name);
- if (*decompressor) {
+ if (compress_name) {
printk(KERN_NOTICE "RAMDISK: %s image found at block %d\n",
compress_name, start_block);
+ if (!*decompressor)
+ printk(KERN_CRIT "RAMDISK: %s decompressor not configured!\n",
+ compress_name);
nblocks = 0;
goto done;
}