diff options
Diffstat (limited to 'init/do_mounts_rd.c')
| -rw-r--r-- | init/do_mounts_rd.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/init/do_mounts_rd.c b/init/do_mounts_rd.c index 6be2879cca66..7c098ac9068a 100644 --- a/init/do_mounts_rd.c +++ b/init/do_mounts_rd.c | |||
| @@ -57,6 +57,11 @@ static int __init crd_load(int in_fd, int out_fd, decompress_fn deco); | |||
| 57 | * cramfs | 57 | * cramfs |
| 58 | * squashfs | 58 | * squashfs |
| 59 | * gzip | 59 | * gzip |
| 60 | * bzip2 | ||
| 61 | * lzma | ||
| 62 | * xz | ||
| 63 | * lzo | ||
| 64 | * lz4 | ||
| 60 | */ | 65 | */ |
| 61 | static int __init | 66 | static int __init |
| 62 | identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor) | 67 | identify_ramdisk_image(int fd, int start_block, decompress_fn *decompressor) |
| @@ -342,6 +347,13 @@ static int __init crd_load(int in_fd, int out_fd, decompress_fn deco) | |||
| 342 | int result; | 347 | int result; |
| 343 | crd_infd = in_fd; | 348 | crd_infd = in_fd; |
| 344 | crd_outfd = out_fd; | 349 | crd_outfd = out_fd; |
| 350 | |||
| 351 | if (!deco) { | ||
| 352 | pr_emerg("Invalid ramdisk decompression routine. " | ||
| 353 | "Select appropriate config option.\n"); | ||
| 354 | panic("Could not decompress initial ramdisk image."); | ||
| 355 | } | ||
| 356 | |||
| 345 | result = deco(NULL, 0, compr_fill, compr_flush, NULL, NULL, error); | 357 | result = deco(NULL, 0, compr_fill, compr_flush, NULL, NULL, error); |
| 346 | if (decompress_error) | 358 | if (decompress_error) |
| 347 | result = 1; | 359 | result = 1; |
